1
set @old_concurrent_insert= @@global.concurrent_insert;
2
set @@global.concurrent_insert= 0;
3
drop table if exists t1, t2, t3;
4
create table t1 (kill_id int);
5
insert into t1 values(connection_id());
6
select ((@id := kill_id) - kill_id) from t1;
7
((@id := kill_id) - kill_id)
10
select ((@id := kill_id) - kill_id) from t1;
11
((@id := kill_id) - kill_id)
13
select @id != connection_id();
14
@id != connection_id()
20
kill (select count(*) from mysql.user);
21
ERROR 42000: This version of MySQL doesn't yet support 'Usage of subqueries or stored function calls as part of this statement'
22
create table t1 (id int primary key);
23
create table t2 (id int unsigned not null);
24
insert into t2 select id from t1;
25
create table t3 (kill_id int);
26
insert into t3 values(connection_id());
27
select id from t1 where id in (select distinct a.id from t2 a, t2 b, t2 c, t2 d group by a.id, b.id, c.id, d.id having a.id between 10 and 20);
28
select ((@id := kill_id) - kill_id) from t3;
29
((@id := kill_id) - kill_id)
32
Got one of the listed errors
33
drop table t1, t2, t3;
34
select get_lock("a", 10);
37
select get_lock("a", 10);
43
select RELEASE_LOCK("a");
46
create table t1(f1 int);
47
create function bug27563() returns int(11)
50
declare continue handler for sqlstate '70100' set @a:= 'killed';
51
declare continue handler for sqlexception set @a:= 'exception';
52
set @a= get_lock("lock27563", 10);
55
select get_lock("lock27563",10);
56
get_lock("lock27563",10)
58
insert into t1 values (bug27563());
59
ERROR 70100: Query execution was interrupted
65
insert into t1 values(0);
66
update t1 set f1= bug27563();
67
ERROR 70100: Query execution was interrupted
74
insert into t1 values(1);
75
delete from t1 where bug27563() is null;
76
ERROR 70100: Query execution was interrupted
84
select * from t1 where f1= bug27563();
85
ERROR 70100: Query execution was interrupted
89
create procedure proc27563()
91
declare continue handler for sqlstate '70100' set @a:= 'killed';
92
declare continue handler for sqlexception set @a:= 'exception';
93
select get_lock("lock27563",10);
94
select "shouldn't be selected";
97
get_lock("lock27563",10)
99
ERROR 70100: Query execution was interrupted
103
create table t2 (f2 int);
104
create trigger trg27563 before insert on t1 for each row
106
declare continue handler for sqlstate '70100' set @a:= 'killed';
107
declare continue handler for sqlexception set @a:= 'exception';
108
set @a:= get_lock("lock27563",10);
109
insert into t2 values(1);
111
insert into t1 values(2),(3);
112
ERROR 70100: Query execution was interrupted
122
select release_lock("lock27563");
123
release_lock("lock27563")
126
drop function bug27563;
127
drop procedure proc27563;
128
PREPARE stmt FROM 'EXPLAIN SELECT * FROM t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40 WHERE a1=a2 AND a2=a3 AND a3=a4 AND a4=a5 AND a5=a6 AND a6=a7 AND a7=a8 AND a8=a9 AND a9=a10 AND a10=a11 AND a11=a12 AND a12=a13 AND a13=a14 AND a14=a15 AND a15=a16 AND a16=a17 AND a17=a18 AND a18=a19 AND a19=a20 AND a20=a21 AND a21=a22 AND a22=a23 AND a23=a24 AND a24=a25 AND a25=a26 AND a26=a27 AND a27=a28 AND a28=a29 AND a29=a30 AND a30=a31 AND a31=a32 AND a32=a33 AND a33=a34 AND a34=a35 AND a35=a36 AND a36=a37 AND a37=a38 AND a38=a39 AND a39=a40 ';
131
# Bug#19723: kill of active connection yields different error code
132
# depending on platform.
136
KILL CONNECTION_ID();
137
# CR_SERVER_LOST, CR_SERVER_GONE_ERROR, depending on the timing
138
# of close of the connection socket
140
Got one of the listed errors
141
set @@global.concurrent_insert= @old_concurrent_insert;