Below is the list of changes that have just been committed into a local
5.1 repository of istruewing. When istruewing does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-10-22 09:17:16+02:00, istruewing@stripped +2 -0
Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
corrupts a MERGE table
Forgot to include this new test case in the last commit.
mysql-test/r/merge-big.result@stripped, 2007-10-22 09:17:15+02:00, istruewing@stripped
+52 -0
Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table
New test result
mysql-test/r/merge-big.result@stripped, 2007-10-22 09:17:15+02:00, istruewing@stripped +0
-0
mysql-test/t/merge-big.test@stripped, 2007-10-22 09:17:15+02:00, istruewing@stripped +86
-0
Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table
New test case
mysql-test/t/merge-big.test@stripped, 2007-10-22 09:17:15+02:00, istruewing@stripped +0
-0
diff -Nrup a/mysql-test/r/merge-big.result b/mysql-test/r/merge-big.result
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/r/merge-big.result 2007-10-22 09:17:15 +02:00
@@ -0,0 +1,52 @@
+drop table if exists t1,t2,t3,t4,t5,t6;
+#
+# Extra tests for Bug#26379 - Combination of FLUSH TABLE and
+# REPAIR TABLE corrupts a MERGE table
+#
+CREATE TABLE t1 (c1 INT);
+CREATE TABLE t2 (c1 INT);
+CREATE TABLE t3 (c1 INT);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t3 VALUES (3);
+#
+# CREATE ... SELECT
+# try to access parent from another thread.
+#
+# connection con1
+SET SESSION debug="+d,sleep_create_select_before_lock";
+CREATE TABLE t4 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2)
+INSERT_METHOD=FIRST SELECT * FROM t3;
+# connection default
+# Now try to access the parent.
+# If 3 is in table, SELECT had to wait.
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+# connection con1
+SET SESSION debug="-d,sleep_create_select_before_lock";
+# connection default
+# Cleanup for next test.
+DROP TABLE t4;
+DELETE FROM t1 WHERE c1 != 1;
+#
+# CREATE ... SELECT
+# try to access child from another thread.
+#
+# connection con1
+SET SESSION debug="+d,sleep_create_select_before_lock";
+CREATE TABLE t4 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2)
+INSERT_METHOD=FIRST SELECT * FROM t3;
+# connection default
+# Now try to access a child.
+# If 3 is in table, SELECT had to wait.
+SELECT * FROM t1 ORDER BY c1;
+c1
+1
+3
+# connection con1
+SET SESSION debug="-d,sleep_create_select_before_lock";
+# connection default
+DROP TABLE t1, t2, t3, t4;
diff -Nrup a/mysql-test/t/merge-big.test b/mysql-test/t/merge-big.test
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/t/merge-big.test 2007-10-22 09:17:15 +02:00
@@ -0,0 +1,86 @@
+#
+# Test of MERGE tables with multisession and many waits.
+#
+# This test takes rather long time so let us run it only in --big-test mode
+--source include/big_test.inc
+# We are using some debug-only features in this test
+--source include/have_debug.inc
+
+--disable_warnings
+drop table if exists t1,t2,t3,t4,t5,t6;
+--enable_warnings
+
+--echo #
+--echo # Extra tests for Bug#26379 - Combination of FLUSH TABLE and
+--echo # REPAIR TABLE corrupts a MERGE table
+--echo #
+CREATE TABLE t1 (c1 INT);
+CREATE TABLE t2 (c1 INT);
+CREATE TABLE t3 (c1 INT);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t3 VALUES (3);
+--echo #
+--echo # CREATE ... SELECT
+--echo # try to access parent from another thread.
+--echo #
+#SELECT NOW();
+ --echo # connection con1
+ connect (con1,localhost,root,,);
+ let $con1_id= `SELECT CONNECTION_ID()`;
+ SET SESSION debug="+d,sleep_create_select_before_lock";
+ send CREATE TABLE t4 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2)
+ INSERT_METHOD=FIRST SELECT * FROM t3;
+--echo # connection default
+connection default;
+# wait for the other query to start executing
+let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE ID = $con1_id AND STATE = 'DBUG sleep';
+--source include/wait_condition.inc
+#SELECT NOW();
+--echo # Now try to access the parent.
+--echo # If 3 is in table, SELECT had to wait.
+SELECT * FROM t4 ORDER BY c1;
+#SELECT NOW();
+ --echo # connection con1
+ connection con1;
+ reap;
+ #SELECT NOW();
+ SET SESSION debug="-d,sleep_create_select_before_lock";
+ disconnect con1;
+--echo # connection default
+connection default;
+--echo # Cleanup for next test.
+DROP TABLE t4;
+DELETE FROM t1 WHERE c1 != 1;
+--echo #
+--echo # CREATE ... SELECT
+--echo # try to access child from another thread.
+--echo #
+#SELECT NOW();
+ --echo # connection con1
+ connect (con1,localhost,root,,);
+ let $con1_id= `SELECT CONNECTION_ID()`;
+ SET SESSION debug="+d,sleep_create_select_before_lock";
+ send CREATE TABLE t4 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2)
+ INSERT_METHOD=FIRST SELECT * FROM t3;
+--echo # connection default
+connection default;
+# wait for the other query to start executing
+let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE ID = $con1_id AND STATE = 'DBUG sleep';
+--source include/wait_condition.inc
+#SELECT NOW();
+--echo # Now try to access a child.
+--echo # If 3 is in table, SELECT had to wait.
+SELECT * FROM t1 ORDER BY c1;
+#SELECT NOW();
+ --echo # connection con1
+ connection con1;
+ reap;
+ #SELECT NOW();
+ SET SESSION debug="-d,sleep_create_select_before_lock";
+ disconnect con1;
+--echo # connection default
+connection default;
+DROP TABLE t1, t2, t3, t4;
| Thread |
|---|
| • bk commit into 5.1 tree (istruewing:1.2577) BUG#26379 | Ingo Struewing | 22 Oct |