Below is the list of changes that have just been committed into a local
5.1 repository of dlenev. When dlenev 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-08-05 13:55:37+04:00, dlenev@stripped +2 -0
Added test for bug #21281 "Pending write lock is incorrectly removed
when its statement being KILLed". The bug itself was fixed by separate
patch in 5.0 tree.
mysql-test/r/lock_multi.result@stripped, 2007-08-05 13:55:29+04:00, dlenev@stripped
+10 -0
Added test for bug #21281 "Pending write lock is incorrectly removed
when its statement being KILLed".
mysql-test/t/lock_multi.test@stripped, 2007-08-05 13:55:29+04:00, dlenev@stripped
+35 -0
Added test for bug #21281 "Pending write lock is incorrectly removed
when its statement being KILLed".
diff -Nrup a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result
--- a/mysql-test/r/lock_multi.result 2006-10-05 02:36:01 +04:00
+++ b/mysql-test/r/lock_multi.result 2007-08-05 13:55:29 +04:00
@@ -95,3 +95,13 @@ alter table t1 auto_increment=0; alter t
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1
auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
unlock tables;
drop table t1;
+create table t1 (i int);
+lock table t1 read;
+update t1 set i= 10;;
+select * from t1;;
+kill query ID;
+i
+ERROR 70100: Query execution was interrupted
+unlock tables;
+drop table t1;
+End of 5.1 tests
diff -Nrup a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test
--- a/mysql-test/t/lock_multi.test 2007-02-27 13:39:27 +03:00
+++ b/mysql-test/t/lock_multi.test 2007-08-05 13:55:29 +04:00
@@ -270,3 +270,38 @@ drop table t1;
# End of 5.0 tests
+
+#
+# Bug #21281 "Pending write lock is incorrectly removed when its
+# statement being KILLed"
+#
+create table t1 (i int);
+connection locker;
+lock table t1 read;
+connection writer;
+--send update t1 set i= 10;
+connection reader;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Locked" and info = "update t1 set i= 10";
+--source include/wait_condition.inc
+--send select * from t1;
+connection default;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Locked" and info = "select * from t1";
+--source include/wait_condition.inc
+let $ID= `select id from information_schema.processlist where state = "Locked" and info =
"update t1 set i= 10"`;
+--replace_result $ID ID
+eval kill query $ID;
+connection reader;
+--reap
+connection writer;
+--error ER_QUERY_INTERRUPTED
+--reap
+connection locker;
+unlock tables;
+connection default;
+drop table t1;
+
+--echo End of 5.1 tests
| Thread |
|---|
| • bk commit into 5.1 tree (dlenev:1.2576) BUG#21281 | dlenev | 5 Aug |