federated tables structure not replicable
am 29.09.2005 17:32:10 von Giuseppe Maxiafederated tables structure not replicable
>Description:
In MySQL 5.0.13 a change for federated tables was made,
to move the connection string from COMMENT to CONNECTION.
While this works, federated tables now can not be backed up
since "SHOW CREATE TABLE" does not include the CONNECTION
string.
>How-To-Repeat:
try using the output of
SHOW CREATE TABLE federated_table_name \G
to create a new table.
Or try this:
$ mysqldump --no-data -h host1 database_name federated_table_name | \
mysql -h host2 database_name
>Fix:
No direct workaround.
When creating a federated table, add a COMMENT with the connection string,
and then you can do something like
$ mysqldump --no-data -h host1 database_name federated_table_name | \
perl -pe 's/\bCOMMENT\s*=\b/CONNECTION=/' | \
mysql -h host2 database_name
Notice that, if you have enough privileges to access the .frm file, you can get the
connection string with a regexp:
$ perl -lne 'print $1 if m{(mysql://[^/]+\@[^/]+/[^/]+/\w+)}' /datadir/dbname/fed_table.frm
mysql://user:pass@192.168.2.64:3306/r_db/r_table
regards
GM
--
Giuseppe Maxia
CTO http://www.StarData.it
MySQL Certified Professional
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org