#At file:///home/satya/WORK/mysql-5.1-bugteam-40827/ based on revid:satya.bn@stripped
2880 Satya B 2009-04-30
Addition to the fix for BUG#40827 - Killing insert-select to MyISAM can cause
table corruption
Moved the testcase from the file myisam.test to the new testfile
mysiam_debug.test
added:
mysql-test/r/myisam_debug.result
mysql-test/t/myisam_debug.test
modified:
mysql-test/r/myisam.result
mysql-test/t/myisam.test
per-file messages:
mysql-test/r/myisam.result
Removed result file for BUG#40827
mysql-test/r/myisam_debug.result
Result file for BUG#40827
mysql-test/t/myisam.test
Removed testcase for BUG#40827
mysql-test/t/myisam_debug.test
TestCase for BUG#40827
=== modified file 'mysql-test/r/myisam.result'
--- a/mysql-test/r/myisam.result 2009-04-30 07:10:12 +0000
+++ b/mysql-test/r/myisam.result 2009-04-30 11:03:44 +0000
@@ -2252,43 +2252,4 @@ h+0 d + 0 e g + 0
1 1 3 0
1 1 4 0
DROP TABLE t1;
-#
-# BUG#40827 - Killing insert-select to MyISAM can cause table corruption
-#
-CREATE TABLE `t1` (
-`id` BIGINT(20) ,
-`id1` BIGINT(20) AUTO_INCREMENT,
-KEY(id1), KEY(id)
-) ENGINE=MyISAM;
-CREATE TABLE `t2` (
-`id` BIGINT(20) ,
-`id1` BIGINT(20) AUTO_INCREMENT,
-KEY (id1), KEY(id)
-) ENGINE=MyISAM;
-INSERT INTO t2 (id) VALUES (123);
-INSERT INTO t2 (id) SELECT id FROM t2;
-INSERT INTO t2 (id) SELECT id FROM t2;
-INSERT INTO t2 (id) SELECT id FROM t2;
-INSERT INTO t2 (id) SELECT id FROM t2;
-INSERT INTO t2 (id) SELECT id FROM t2;
-INSERT INTO t2 (id) SELECT id FROM t2;
-INSERT INTO t2 (id) SELECT id FROM t2;
-INSERT INTO t2 (id) SELECT id FROM t2;
-INSERT INTO t2 (id) SELECT id FROM t2;
-INSERT INTO t2 (id) SELECT id FROM t2;
-# Switch to insert Connection
-SET SESSION debug='+d,wait_in_enable_indexes';
-# Send insert data
-INSERT INTO t1(id) SELECT id FROM t2;
-# Switch to default Connection
-# Wait for insert data to reach the debug point
-SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
-WHERE STATE = 'wait_in_enable_indexes' AND
-INFO = "INSERT INTO t1(id) SELECT id FROM t2"
-INTO @thread_id;
-KILL QUERY @thread_id;
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-DROP TABLE t1,t2;
End of 5.1 tests
=== added file 'mysql-test/r/myisam_debug.result'
--- a/mysql-test/r/myisam_debug.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/myisam_debug.result 2009-04-30 11:03:44 +0000
@@ -0,0 +1,39 @@
+#
+# BUG#40827 - Killing insert-select to MyISAM can cause table corruption
+#
+CREATE TABLE `t1` (
+`id` BIGINT(20) ,
+`id1` BIGINT(20) AUTO_INCREMENT,
+KEY(id1), KEY(id)
+) ENGINE=MyISAM;
+CREATE TABLE `t2` (
+`id` BIGINT(20) ,
+`id1` BIGINT(20) AUTO_INCREMENT,
+KEY (id1), KEY(id)
+) ENGINE=MyISAM;
+INSERT INTO t2 (id) VALUES (123);
+INSERT INTO t2 (id) SELECT id FROM t2;
+INSERT INTO t2 (id) SELECT id FROM t2;
+INSERT INTO t2 (id) SELECT id FROM t2;
+INSERT INTO t2 (id) SELECT id FROM t2;
+INSERT INTO t2 (id) SELECT id FROM t2;
+INSERT INTO t2 (id) SELECT id FROM t2;
+INSERT INTO t2 (id) SELECT id FROM t2;
+INSERT INTO t2 (id) SELECT id FROM t2;
+INSERT INTO t2 (id) SELECT id FROM t2;
+INSERT INTO t2 (id) SELECT id FROM t2;
+# Switch to insert Connection
+SET SESSION debug='+d,wait_in_enable_indexes';
+# Send insert data
+INSERT INTO t1(id) SELECT id FROM t2;
+# Switch to default Connection
+# Wait for insert data to reach the debug point
+SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE STATE = 'wait_in_enable_indexes' AND
+INFO = "INSERT INTO t1(id) SELECT id FROM t2"
+INTO @thread_id;
+KILL QUERY @thread_id;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1,t2;
=== modified file 'mysql-test/t/myisam.test'
--- a/mysql-test/t/myisam.test 2009-04-30 07:10:12 +0000
+++ b/mysql-test/t/myisam.test 2009-04-30 11:03:44 +0000
@@ -1503,57 +1503,5 @@ SELECT h+0, d + 0, e, g + 0 FROM t1;
DROP TABLE t1;
---echo #
---echo # BUG#40827 - Killing insert-select to MyISAM can cause table corruption
---echo #
-
-CONNECT (insertConn, localhost, root,,);
-
-CREATE TABLE `t1` (
-`id` BIGINT(20) ,
-`id1` BIGINT(20) AUTO_INCREMENT,
- KEY(id1), KEY(id)
-) ENGINE=MyISAM;
-
-CREATE TABLE `t2` (
-`id` BIGINT(20) ,
-`id1` BIGINT(20) AUTO_INCREMENT,
- KEY (id1), KEY(id)
-) ENGINE=MyISAM;
-
-INSERT INTO t2 (id) VALUES (123);
-
-let $i = 10;
-while ($i)
-{
- INSERT INTO t2 (id) SELECT id FROM t2;
- dec $i;
-}
-
---echo # Switch to insert Connection
-CONNECTION insertConn;
-SET SESSION debug='+d,wait_in_enable_indexes';
---echo # Send insert data
-SEND INSERT INTO t1(id) SELECT id FROM t2;
-
---echo # Switch to default Connection
-CONNECTION default;
---echo # Wait for insert data to reach the debug point
-
-let $wait_condition=
- SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
- WHERE STATE = "wait_in_enable_indexes" AND
- INFO = "INSERT INTO t1(id) SELECT id FROM t2";
---source include/wait_condition.inc
-
-SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
-WHERE STATE = 'wait_in_enable_indexes' AND
-INFO = "INSERT INTO t1(id) SELECT id FROM t2"
-INTO @thread_id;
-
-KILL QUERY @thread_id;
-CHECK TABLE t1;
-DROP TABLE t1,t2;
-DISCONNECT insertConn;
--echo End of 5.1 tests
=== added file 'mysql-test/t/myisam_debug.test'
--- a/mysql-test/t/myisam_debug.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/myisam_debug.test 2009-04-30 11:03:44 +0000
@@ -0,0 +1,54 @@
+--source include/have_debug.inc
+
+--echo #
+--echo # BUG#40827 - Killing insert-select to MyISAM can cause table corruption
+--echo #
+
+CONNECT (insertConn, localhost, root,,);
+
+CREATE TABLE `t1` (
+`id` BIGINT(20) ,
+`id1` BIGINT(20) AUTO_INCREMENT,
+ KEY(id1), KEY(id)
+) ENGINE=MyISAM;
+
+CREATE TABLE `t2` (
+`id` BIGINT(20) ,
+`id1` BIGINT(20) AUTO_INCREMENT,
+ KEY (id1), KEY(id)
+) ENGINE=MyISAM;
+
+INSERT INTO t2 (id) VALUES (123);
+
+let $i = 10;
+while ($i)
+{
+ INSERT INTO t2 (id) SELECT id FROM t2;
+ dec $i;
+}
+
+--echo # Switch to insert Connection
+CONNECTION insertConn;
+SET SESSION debug='+d,wait_in_enable_indexes';
+--echo # Send insert data
+SEND INSERT INTO t1(id) SELECT id FROM t2;
+
+--echo # Switch to default Connection
+CONNECTION default;
+--echo # Wait for insert data to reach the debug point
+
+let $wait_condition=
+ SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE STATE = "wait_in_enable_indexes" AND
+ INFO = "INSERT INTO t1(id) SELECT id FROM t2";
+--source include/wait_condition.inc
+
+SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE STATE = 'wait_in_enable_indexes' AND
+INFO = "INSERT INTO t1(id) SELECT id FROM t2"
+INTO @thread_id;
+
+KILL QUERY @thread_id;
+CHECK TABLE t1;
+DROP TABLE t1,t2;
+DISCONNECT insertConn;
| Thread |
|---|
| • bzr commit into mysql-5.1-bugteam branch (satya.bn:2880) Bug#40827 | Satya B | 30 Apr |