mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
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: Added test for bug #21281 "Pending write lock is incorrectly removed when its statement being KILLed". mysql-test/t/lock_multi.test: Added test for bug #21281 "Pending write lock is incorrectly removed when its statement being KILLed".
This commit is contained in:
@@ -95,3 +95,13 @@ alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1
|
|||||||
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; //
|
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;
|
unlock tables;
|
||||||
drop table t1;
|
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
|
||||||
|
@@ -270,3 +270,38 @@ drop table t1;
|
|||||||
|
|
||||||
# End of 5.0 tests
|
# 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
|
||||||
|
Reference in New Issue
Block a user