Bug #9687 | merge table does not always release/closes tables from union if dropped | ||
---|---|---|---|
Submitted: | 6 Apr 2005 16:54 | Modified: | 7 Apr 2005 19:49 |
Reporter: | Martin Friebe (Gold Quality Contributor) (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.1.11 | OS: | FreeBSD (freebsd) |
Assigned to: | Geert Vanderkelen | CPU Architecture: | Any |
[6 Apr 2005 16:54]
Martin Friebe
[7 Apr 2005 13:35]
Geert Vanderkelen
Hi Martin, This is expected behavior and is mentioned in the manual on the following URL: http://dev.mysql.com/doc/mysql/en/merge-table-problems.html You can't use DROP TABLE, ALTER TABLE, DELETE FROM without a WHERE clause, REPAIR TABLE, TRUNCATE TABLE, OPTIMIZE TABLE, or ANALYZE TABLE on any of the tables that are mapped into a MERGE table that is ``open.'' If you do this, the MERGE table may still refer to the original table and you get unexpected results. The easiest way to work around this deficiency is to issue a FLUSH TABLES statement to ensure that no MERGE tables remain ``open.'' Regards, Geert
[7 Apr 2005 13:43]
Martin Friebe
This differs from the subscription. I am aware that if I drop table t1 (the "real" table, while t2 (the merge) is open, then this will not work. But in the example I drop the merge table first. I cannot read from the documentation, that a droped merge table could still be open? So after droping the merge, it should not refer to the myisam table anymore (as in the 2nd example)
[7 Apr 2005 17:37]
Martin Friebe
Sorry, my fault, there was a typo in one of the queries, mixing up with a different table. There is no bug at all. Sorry