From da9c659c8196d1da63330fc7b1b6710217801a6f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 5 Mar 2007 11:52:28 +0100 Subject: Bug#26464 - insert delayed + update + merge = corruption Using INSERT DELAYED on MERGE tables could lead to table corruptions. The manual lists a couple of storage engines, which can be used with INSERT DELAYED. MERGE is not in this list. The attempt to try it anyway has not been rejected yet. This bug was not detected earlier as it can work under special circumstances. Most notable is low concurrency. To be safe, this patch rejects any attempt to use INSERT DELAYED on MERGE tables. mysql-test/r/merge.result: Bug#26464 - insert delayed + update + merge = corruption Added test result. mysql-test/t/merge.test: Bug#26464 - insert delayed + update + merge = corruption Added test. sql/ha_myisammrg.h: Bug#26464 - insert delayed + update + merge = corruption Removed HA_CAN_INSERT_DELAYED flag from table_flags(). The insert delayed thread upgrades the lock from the first entry in MYSQL_LOCK::locks only. Hence it is incapable to handle MERGE tables, which have as many entries in this array as they have MyISAM sub-tables. --- sql/ha_myisammrg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/ha_myisammrg.h') diff --git a/sql/ha_myisammrg.h b/sql/ha_myisammrg.h index 84eaae04590..84af55b262e 100644 --- a/sql/ha_myisammrg.h +++ b/sql/ha_myisammrg.h @@ -37,7 +37,7 @@ class ha_myisammrg: public handler { return (HA_REC_NOT_IN_SEQ | HA_AUTO_PART_KEY | HA_READ_RND_SAME | HA_NULL_IN_KEY | HA_CAN_INDEX_BLOBS | HA_FILE_BASED | - HA_CAN_INSERT_DELAYED | HA_ANY_INDEX_MAY_BE_UNIQUE); + HA_ANY_INDEX_MAY_BE_UNIQUE); } ulong index_flags(uint inx, uint part, bool all_parts) const { -- cgit v1.2.1