summaryrefslogtreecommitdiff
path: root/mysql-test/t/kill.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/kill.test')
-rw-r--r--mysql-test/t/kill.test37
1 files changed, 30 insertions, 7 deletions
diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test
index 9ef5e272d46..8302c767985 100644
--- a/mysql-test/t/kill.test
+++ b/mysql-test/t/kill.test
@@ -15,6 +15,7 @@ connection con1;
drop table if exists t1, t2, t3;
--enable_warnings
+--disable_reconnect
create table t1 (kill_id int);
insert into t1 values(connection_id());
@@ -24,12 +25,18 @@ select ((@id := kill_id) - kill_id) from t1;
kill @id;
connection con1;
---sleep 1
+--sleep 2
---disable_reconnect
-# this statement should fail
---error 2006,2013
+--disable_query_log
+--disable_result_log
+# One of the following statements should fail
+--error 0,2006,2013
select 1;
+--error 0,2006,2013
+select 1;
+--enable_query_log
+--enable_result_log
+
--enable_reconnect
# this should work, and we should have a new connection_id()
select ((@id := kill_id) - kill_id) from t1;
@@ -40,7 +47,6 @@ connection con2;
select 4;
drop table t1;
-disconnect con2;
connection default;
#
# BUG#14851: killing long running subquery processed via a temporary table.
@@ -81,10 +87,27 @@ connection conn1;
-- error 1053,2013
reap;
-disconnect conn1;
-disconnect conn2;
connection default;
drop table t1, t2, t3;
# End of 4.1 tests
+
+#
+# test of blocking of sending ERROR after OK or EOF
+#
+connection con1;
+select get_lock("a", 10);
+connection con2;
+let $ID= `select connection_id()`;
+send select get_lock("a", 10);
+real_sleep 2;
+connection con1;
+disable_query_log;
+eval kill query $ID;
+enable_query_log;
+connection con2;
+reap;
+select 1;
+connection con1;
+select RELEASE_LOCK("a");