federated tables structure not replicable

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://[^/]+\ [at] [^/]+/[^/]+/\w+)}' /datadir/dbname/fed_table.frm
mysql://user:pass [at] 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 [at] m.gmane.org
Giuseppe Maxia [ Do, 29 September 2005 17:32 ] [ ID #989739 ]

Re: federated tables structure not replicable

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

<cut>

Regards,

Miguel Angel Sol=F3rzano <miguel [at] mysql.com>
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 [at] m.gmane.org
miguel solorzano [ Mo, 03 Oktober 2005 20:45 ] [ ID #994743 ]
Datenbanken » gmane.comp.db.mysql.bugs » federated tables structure not replicable

Vorheriges Thema: Abnormally low performance on INSERTS?
Nächstes Thema: lost connection with SELECT queries and DELETE in SP