Debian Codegraph @

mysql-test/suite/innodb/t/innodb_bug51920.test

raw
1 --source include/have_innodb.inc
2 #
3 # Bug #51920: InnoDB connections in lock wait ignore KILL until timeout
4 #
5 -- source include/not_embedded.inc
6
7 CREATE TABLE bug51920 (i INT) ENGINE=InnoDB;
8 INSERT INTO bug51920 VALUES (1);
9
10 BEGIN;
11 SELECT * FROM bug51920 FOR UPDATE;
12
13 connect (con1,localhost,root,,);
14
15 connection con1;
16 --send
17 UPDATE bug51920 SET i=2;
18
19 connection default;
20 let $wait_condition =
21 SELECT COUNT(*)=1 FROM information_schema.processlist
22 WHERE INFO="UPDATE bug51920 SET i=2";
23 -- source include/wait_condition.inc
24
25 --disable_cursor_protocol
26 --enable_prepare_warnings
27 SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
28 WHERE INFO="UPDATE bug51920 SET i=2"
29 INTO @thread_id;
30 --disable_prepare_warnings
31 --enable_cursor_protocol
32
33 KILL @thread_id;
34 let $wait_condition =
35 SELECT COUNT(*)=0 FROM information_schema.processlist WHERE ID=@thread_id;
36 -- source include/wait_condition.inc
37
38 #
39 # Bug#19723: kill of active connection yields different error code
40 # depending on platform.
41 #
42 connection con1;
43 -- error 1317, 2006, 2013, ER_CONNECTION_KILLED, 2026
44 reap;
45 connection default;
46 DROP TABLE bug51920;
47 -- disconnect con1