1
# Disable concurrent inserts to avoid test failures when reading the
2
# connection id which was inserted into a table by another thread.
3
connect (con1, localhost, root,,);
4
connect (con2, localhost, root,,);
9
drop table if exists t1, t2, t3;
13
create table t1 (kill_id int);
14
insert into t1 values(connection_id());
18
select ((@id := kill_id) - kill_id) from t1;
26
# One of the following statements should fail
35
# this should work, and we should have a new connection_id()
36
select ((@id := kill_id) - kill_id) from t1;
37
select @id != connection_id();
39
#make sure the server is still alive
46
# BUG#14851: killing long running subquery processed via a temporary table.
48
create table t1 (id int primary key);
49
create table t2 (id int not null);
51
connect (conn1, localhost, root,,);
60
eval insert into t1 values ($1);
67
insert into t2 select id from t1;
69
create table t3 (kill_id int);
70
insert into t3 values(connection_id());
71
connect (conn2, localhost, root,,);
76
# This is a very long running query. If this test start failing, it may
77
# be necessary to change to an even longer query.
78
send 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);
82
select ((@id := kill_id) - kill_id) from t3;
87
-- error 1053,2013,1104
92
drop table t1, t2, t3;
96
# Fix issue with kill $
97
#create table t1(f1 int);
100
#insert into t1 values(0);
102
#send update t1 set f1= bug27563();
116
#insert into t1 values(1);
118
#send delete from t1 where bug27563() is null;
122
#eval kill query $ID;
133
#send select * from t1 where f1= bug27563();
137
#eval kill query $ID;
145
###########################################################################
148
--echo # Bug#19723: kill of active connection yields different error code
149
--echo # depending on platform.
153
--echo # Connection: con2.
156
KILL CONNECTION_ID();
158
--echo # CR_SERVER_LOST, CR_SERVER_GONE_ERROR, depending on the timing
159
--echo # of close of the connection socket
164
###########################################################################