#At file:///mnt/raid/alik/MySQL/bzr/FixDisabled/6.0-rt-fix.disabled/ based on revid:alik@stripped
2724 Alexander Nozdrin 2009-02-13
Disable WL#3726-part of main.kill test case in order to avoid random failures.
Noted in Bug#37780.
modified:
mysql-test/r/kill.result
mysql-test/t/kill.test
=== modified file 'mysql-test/r/kill.result'
--- a/mysql-test/r/kill.result 2008-08-18 05:43:50 +0000
+++ b/mysql-test/r/kill.result 2009-02-13 17:00:42 +0000
@@ -138,107 +138,4 @@ KILL CONNECTION_ID();
# of close of the connection socket
SELECT 1;
Got one of the listed errors
-#
-# Additional test for WL#3726 "DDL locking for all metadata objects"
-# Check that DDL and DML statements waiting for metadata locks can
-# be killed. Note that we don't cover all situations here since it
-# can be tricky to write test case for some of them (e.g. REPAIR or
-# ALTER and other statements under LOCK TABLES).
-#
-drop tables if exists t1, t2, t3;
-create table t1 (i int primary key);
-# Test for RENAME TABLE
-# Switching to connection 'blocker'
-lock table t1 read;
-# Switching to connection 'ddl'
-rename table t1 to t2;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-# Test for DROP TABLE
-drop table t1;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-# Test for CREATE TRIGGER
-create trigger t1_bi before insert on t1 for each row set @a:=1;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-#
-# Tests for various kinds of ALTER TABLE
-#
-# Full-blown ALTER which should copy table
-alter table t1 add column j int;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-# Two kinds of simple ALTER
-alter table t1 rename to t2;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-alter table t1 disable keys;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-# Fast ALTER
-alter table t1 alter column i set default 100;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-# Special case which is triggered only for MERGE tables.
-# Switching to connection 'blocker'
-unlock tables;
-create table t2 (i int primary key) engine=merge union=(t1);
-lock tables t2 read;
-# Switching to connection 'ddl'
-alter table t2 alter column i set default 100;
-# Switching to connection 'default'
-kill query ID;
-# Switching to connection 'ddl'
-ERROR 70100: Query execution was interrupted
-# Test for DML waiting for meta-data lock
-# Switching to connection 'blocker'
-unlock tables;
-drop table t2;
-create table t2 (k int);
-lock tables t1 read;
-# Switching to connection 'ddl'
-rename tables t1 to t3, t2 to t1;
-# Switching to connection 'dml'
-insert into t2 values (1);
-# Switching to connection 'default'
-kill query ID2;
-# Switching to connection 'dml'
-ERROR 70100: Query execution was interrupted
-# Switching to connection 'blocker'
-unlock tables;
-# Switching to connection 'ddl'
-# Test for DML waiting for tables to be flushed
-# Switching to connection 'blocker'
-lock tables t1 read;
-# Switching to connection 'ddl'
-# Let us mark locked table t1 as old
-flush tables;
-# Switching to connection 'dml'
-select * from t1;
-# Switching to connection 'default'
-kill query ID2;
-# Switching to connection 'dml'
-ERROR 70100: Query execution was interrupted
-# Switching to connection 'blocker'
-unlock tables;
-# Switching to connection 'ddl'
-# Cleanup.
-# Switching to connection 'default'
-drop table t3;
-drop table t1;
set @@global.concurrent_insert= @old_concurrent_insert;
=== modified file 'mysql-test/t/kill.test'
--- a/mysql-test/t/kill.test 2008-08-18 05:43:50 +0000
+++ b/mysql-test/t/kill.test 2009-02-13 17:00:42 +0000
@@ -328,243 +328,247 @@ KILL CONNECTION_ID();
SELECT 1;
--connection default
---echo #
---echo # Additional test for WL#3726 "DDL locking for all metadata objects"
---echo # Check that DDL and DML statements waiting for metadata locks can
---echo # be killed. Note that we don't cover all situations here since it
---echo # can be tricky to write test case for some of them (e.g. REPAIR or
---echo # ALTER and other statements under LOCK TABLES).
---echo #
---disable_warnings
-drop tables if exists t1, t2, t3;
---enable_warnings
-
-create table t1 (i int primary key);
-connect (blocker, localhost, root, , );
-connect (dml, localhost, root, , );
-connect (ddl, localhost, root, , );
-
---echo # Test for RENAME TABLE
---echo # Switching to connection 'blocker'
-connection blocker;
-lock table t1 read;
---echo # Switching to connection 'ddl'
-connection ddl;
-let $ID= `select connection_id()`;
---send rename table t1 to t2
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table" and info = "rename table t1 to t2";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
-
---echo # Test for DROP TABLE
---send drop table t1
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table" and
- info = "drop table t1";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
-
---echo # Test for CREATE TRIGGER
---send create trigger t1_bi before insert on t1 for each row set @a:=1
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table" and
- info = "create trigger t1_bi before insert on t1 for each row set @a:=1";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
-
---echo #
---echo # Tests for various kinds of ALTER TABLE
---echo #
---echo # Full-blown ALTER which should copy table
---send alter table t1 add column j int
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table" and
- info = "alter table t1 add column j int";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
-
---echo # Two kinds of simple ALTER
---send alter table t1 rename to t2
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table" and
- info = "alter table t1 rename to t2";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
---send alter table t1 disable keys
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table" and
- info = "alter table t1 disable keys";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
---echo # Fast ALTER
---send alter table t1 alter column i set default 100
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table" and
- info = "alter table t1 alter column i set default 100";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
---echo # Special case which is triggered only for MERGE tables.
---echo # Switching to connection 'blocker'
-connection blocker;
-unlock tables;
-create table t2 (i int primary key) engine=merge union=(t1);
-lock tables t2 read;
---echo # Switching to connection 'ddl'
-connection ddl;
---send alter table t2 alter column i set default 100
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table" and
- info = "alter table t2 alter column i set default 100";
---source include/wait_condition.inc
---replace_result $ID ID
-eval kill query $ID;
---echo # Switching to connection 'ddl'
-connection ddl;
---error ER_QUERY_INTERRUPTED
---reap
-
---echo # Test for DML waiting for meta-data lock
---echo # Switching to connection 'blocker'
-connection blocker;
-unlock tables;
-drop table t2;
-create table t2 (k int);
-lock tables t1 read;
---echo # Switching to connection 'ddl'
-connection ddl;
-# Let us add pending exclusive metadata lock on t2
---send rename tables t1 to t3, t2 to t1
---echo # Switching to connection 'dml'
-connection dml;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table" and
- info = "rename tables t1 to t3, t2 to t1";
---source include/wait_condition.inc
-let $ID2= `select connection_id()`;
---send insert into t2 values (1)
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table" and
- info = "insert into t2 values (1)";
---source include/wait_condition.inc
---replace_result $ID2 ID2
-eval kill query $ID2;
---echo # Switching to connection 'dml'
-connection dml;
---error ER_QUERY_INTERRUPTED
---reap
---echo # Switching to connection 'blocker'
-connection blocker;
-unlock tables;
---echo # Switching to connection 'ddl'
-connection ddl;
---reap
-
---echo # Test for DML waiting for tables to be flushed
---echo # Switching to connection 'blocker'
-connection blocker;
-lock tables t1 read;
---echo # Switching to connection 'ddl'
-connection ddl;
---echo # Let us mark locked table t1 as old
---send flush tables
---echo # Switching to connection 'dml'
-connection dml;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Flushing tables" and
- info = "flush tables";
---source include/wait_condition.inc
---send select * from t1
---echo # Switching to connection 'default'
-connection default;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table" and
- info = "select * from t1";
---source include/wait_condition.inc
---replace_result $ID2 ID2
-eval kill query $ID2;
---echo # Switching to connection 'dml'
-connection dml;
---error ER_QUERY_INTERRUPTED
---reap
---echo # Switching to connection 'blocker'
-connection blocker;
-unlock tables;
---echo # Switching to connection 'ddl'
-connection ddl;
---reap
-
---echo # Cleanup.
---echo # Switching to connection 'default'
-connection default;
-drop table t3;
-drop table t1;
-
+###########################################################################
+#
+#
+#
+# --echo #
+# --echo # Additional test for WL#3726 "DDL locking for all metadata objects"
+# --echo # Check that DDL and DML statements waiting for metadata locks can
+# --echo # be killed. Note that we don't cover all situations here since it
+# --echo # can be tricky to write test case for some of them (e.g. REPAIR or
+# --echo # ALTER and other statements under LOCK TABLES).
+# --echo #
+# --disable_warnings
+# drop tables if exists t1, t2, t3;
+# --enable_warnings
+#
+# create table t1 (i int primary key);
+# connect (blocker, localhost, root, , );
+# connect (dml, localhost, root, , );
+# connect (ddl, localhost, root, , );
+#
+# --echo # Test for RENAME TABLE
+# --echo # Switching to connection 'blocker'
+# connection blocker;
+# lock table t1 read;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# let $ID= `select connection_id()`;
+# --send rename table t1 to t2
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+# select count(*) = 1 from information_schema.processlist
+# where state = "Waiting for table" and info = "rename table t1 to t2";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+#
+# --echo # Test for DROP TABLE
+# --send drop table t1
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+# select count(*) = 1 from information_schema.processlist
+# where state = "Waiting for table" and
+# info = "drop table t1";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+#
+# --echo # Test for CREATE TRIGGER
+# --send create trigger t1_bi before insert on t1 for each row set @a:=1
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+# select count(*) = 1 from information_schema.processlist
+# where state = "Waiting for table" and
+# info = "create trigger t1_bi before insert on t1 for each row set @a:=1";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+#
+# --echo #
+# --echo # Tests for various kinds of ALTER TABLE
+# --echo #
+# --echo # Full-blown ALTER which should copy table
+# --send alter table t1 add column j int
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+# select count(*) = 1 from information_schema.processlist
+# where state = "Waiting for table" and
+# info = "alter table t1 add column j int";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+#
+# --echo # Two kinds of simple ALTER
+# --send alter table t1 rename to t2
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+# select count(*) = 1 from information_schema.processlist
+# where state = "Waiting for table" and
+# info = "alter table t1 rename to t2";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# --send alter table t1 disable keys
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+# select count(*) = 1 from information_schema.processlist
+# where state = "Waiting for table" and
+# info = "alter table t1 disable keys";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# --echo # Fast ALTER
+# --send alter table t1 alter column i set default 100
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+# select count(*) = 1 from information_schema.processlist
+# where state = "Waiting for table" and
+# info = "alter table t1 alter column i set default 100";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# --echo # Special case which is triggered only for MERGE tables.
+# --echo # Switching to connection 'blocker'
+# connection blocker;
+# unlock tables;
+# create table t2 (i int primary key) engine=merge union=(t1);
+# lock tables t2 read;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --send alter table t2 alter column i set default 100
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+# select count(*) = 1 from information_schema.processlist
+# where state = "Waiting for table" and
+# info = "alter table t2 alter column i set default 100";
+# --source include/wait_condition.inc
+# --replace_result $ID ID
+# eval kill query $ID;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+#
+# --echo # Test for DML waiting for meta-data lock
+# --echo # Switching to connection 'blocker'
+# connection blocker;
+# unlock tables;
+# drop table t2;
+# create table t2 (k int);
+# lock tables t1 read;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# # Let us add pending exclusive metadata lock on t2
+# --send rename tables t1 to t3, t2 to t1
+# --echo # Switching to connection 'dml'
+# connection dml;
+# let $wait_condition=
+# select count(*) = 1 from information_schema.processlist
+# where state = "Waiting for table" and
+# info = "rename tables t1 to t3, t2 to t1";
+# --source include/wait_condition.inc
+# let $ID2= `select connection_id()`;
+# --send insert into t2 values (1)
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+# select count(*) = 1 from information_schema.processlist
+# where state = "Waiting for table" and
+# info = "insert into t2 values (1)";
+# --source include/wait_condition.inc
+# --replace_result $ID2 ID2
+# eval kill query $ID2;
+# --echo # Switching to connection 'dml'
+# connection dml;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# --echo # Switching to connection 'blocker'
+# connection blocker;
+# unlock tables;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --reap
+#
+# --echo # Test for DML waiting for tables to be flushed
+# --echo # Switching to connection 'blocker'
+# connection blocker;
+# lock tables t1 read;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --echo # Let us mark locked table t1 as old
+# --send flush tables
+# --echo # Switching to connection 'dml'
+# connection dml;
+# let $wait_condition=
+# select count(*) = 1 from information_schema.processlist
+# where state = "Flushing tables" and
+# info = "flush tables";
+# --source include/wait_condition.inc
+# --send select * from t1
+# --echo # Switching to connection 'default'
+# connection default;
+# let $wait_condition=
+# select count(*) = 1 from information_schema.processlist
+# where state = "Waiting for table" and
+# info = "select * from t1";
+# --source include/wait_condition.inc
+# --replace_result $ID2 ID2
+# eval kill query $ID2;
+# --echo # Switching to connection 'dml'
+# connection dml;
+# --error ER_QUERY_INTERRUPTED
+# --reap
+# --echo # Switching to connection 'blocker'
+# connection blocker;
+# unlock tables;
+# --echo # Switching to connection 'ddl'
+# connection ddl;
+# --reap
+#
+# --echo # Cleanup.
+# --echo # Switching to connection 'default'
+# connection default;
+# drop table t3;
+# drop table t1;
+#
###########################################################################
# Restore global concurrent_insert value. Keep in the end of the test file.
| Thread |
|---|
| • bzr commit into mysql-6.0 branch (alik:2724) Bug#37780 WL#3726 | Alexander Nozdrin | 13 Feb |