Bug #2514 | TRUNCATE table with merge corupts table | ||
---|---|---|---|
Submitted: | 26 Jan 2004 8:40 | Modified: | 29 Sep 2008 21:32 |
Reporter: | Matt Ryan | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.0.18 | OS: | Windows (w2k) |
Assigned to: | Ingo Strüwing | CPU Architecture: | Any |
[26 Jan 2004 8:40]
Matt Ryan
[26 Jan 2004 12:12]
Dean Ellis
Verified in Linux/Windows. Corruption does not occur if you FLUSH TABLES after querying the merge table (prior to the TRUNCATE).
[26 Jan 2004 13:34]
Sergei Golubchik
This is a documented deficiency: http://www.mysql.com/doc/en/MERGE.html " You can't do DROP TABLE, ALTER TABLE, DELETE FROM table_name without a WHERE clause, REPAIR TABLE, TRUNCATE TABLE, OPTIMIZE TABLE, or ANALYZE TABLE on any of the table that is mapped by a MERGE table that is "open". If you do this, the MERGE table may still refer to the original table and you will get unexpected results. The easiest way to get around this deficiency is to issue the FLUSH TABLES command, ensuring no MERGE tables remain "open". " Unfortunately it cannot be fixed until MySQL will have a new table handling code (now in ToDo)
[27 Sep 2008 9:43]
Konstantin Osipov
This bug has been fixed in 5.1 I believe. There is also a completely new table cache code in 6.0. Needs to be re-verified.
[29 Sep 2008 21:32]
MySQL Verification Team
I couldn't repeat with 5.1/6.0 Servers.