federated tables structure not replicable

federated tables structure not replicable

am 29.09.2005 17:32:10 von Giuseppe Maxia

federated 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

Re: federated tables structure not replicable

am 03.10.2005 20:45:34 von miguel solorzano

At 12:32 29/9/2005, Giuseppe Maxia wrote:
Hello,

Could you please open a bug report at:

http://bugs.mysql.com/

In this way you can track the progress of the bug report.

Thanks in advance



Regards,

Miguel Angel Sol=F3rzano
Florianopolis Santa Catarina - Brazil



--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=3Dgcdmb-bugs@m.gmane.org