Bug #2562 mysqldump creates inserts for merge tables
Submitted: 29 Jan 2004 13:55 Modified: 29 Jan 2004 14:44
Reporter: Melvyn Sopacua Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S1 (Critical)
Version:4.0.17 OS:not relevant
Assigned to: CPU Architecture:Any

[29 Jan 2004 13:55] Melvyn Sopacua
Description:
When dumping a merge table, INSERT statements are created. Granted, when just dumping a table, it is trivial to add --no-data, but it gets trickier with --database or --all-databases, which is what I'm doing now.

This has the added disadvantage, that tables referenced by the UNION become "read only" and UNLOCK TABLES; doesn't seem to affect that state - only a full shutdown does so.

How to repeat:
Have a merge table in a database, then:
mysqldump --all --add-drop-table --databases --no-autocommit --single-transaction --disable-keys test > test.sql

mysql < test.sql

Suggested fix:
Add logic to mysqldump to not dump data for Mrg_MyIsam table types.
[29 Jan 2004 14:20] Sergei Golubchik
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in MySQL.

Additional info:

dupicate of #1846

are you sure you used mysqldump from 4.0.17 ?
This bug was fixed in 4.0.17 already!
[29 Jan 2004 14:38] Melvyn Sopacua
Oops - on the mysqldump side, it's 4.0.16 indeed.

PS: I searched for this bug in category "client" as well as "table types". This is defenitely not a server bug.
[29 Jan 2004 14:44] Sergei Golubchik
I agree.
Fixed :)