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;
27
# One of the following statements should fail
28
--error EE_OK,EE_BADCLOSE,EE_UNKNOWN_CHARSET,EE_CANT_SYMLINK
31
--error EE_OK,EE_BADCLOSE,EE_UNKNOWN_CHARSET,EE_CANT_SYMLINK
38
# this should work, and we should have a new connection_id()
39
select ((@id := kill_id) - kill_id) from t1;
40
select @id != connection_id();
42
#make sure the server is still alive
49
# BUG#14851: killing long running subquery processed via a temporary table.
51
create table t1 (id int primary key);
52
create table t2 (id int not null);
54
connect (conn1, localhost, root,,);
61
eval insert into t1 values ($1);
66
insert into t2 select id from t1;
68
create table t3 (kill_id int);
69
insert into t3 values(connection_id());
70
connect (conn2, localhost, root,,);
74
# This is a very long running query. If this test start failing, it may
75
# be necessary to change to an even longer query.
76
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);
79
select ((@id := kill_id) - kill_id) from t3;
83
#-- error 1053,2013,1104
84
--error ER_SERVER_SHUTDOWN, ER_TOO_BIG_SELECT
89
drop table t1, t2, t3;
93
# Fix issue with kill $
94
#create table t1(f1 int);
97
#insert into t1 values(0);
99
#send update t1 set f1= bug27563();
106
#--error ER_QUERY_INTERRUPTED
113
#insert into t1 values(1);
115
#send delete from t1 where bug27563() is null;
119
#eval kill query $ID;
122
#--error ER_QUERY_INTERRUPTED
130
#send select * from t1 where f1= bug27563();
134
#eval kill query $ID;
137
#--error ER_QUERY_INTERRUPTED
142
###########################################################################
145
--echo # Bug#19723: kill of active connection yields different error code
146
--echo # depending on platform.
150
--echo # Connection: con2.
153
KILL CONNECTION_ID();
155
--echo # CR_SERVER_LOST, CR_SERVER_GONE_ERROR, depending on the timing
156
--echo # of close of the connection socket
158
--error EE_OK,EE_BADCLOSE,EE_UNKNOWN_CHARSET,EE_CANT_SYMLINK
163
###########################################################################