From c2ab84412395f024c077e54d2588747dbe0d2ba5 Mon Sep 17 00:00:00 2001 From: "Krunal Bauskar krunal.bauskar@oracle.com" <> Date: Wed, 17 Oct 2012 14:30:32 +0530 Subject: [PATCH] bug#14765606: ensure select is active before killing it else kill signal is ignored --- .../suite/innodb/r/innodb_bug14704286.result | 20 ++++++++++++++----- .../suite/innodb/t/innodb_bug14704286.test | 12 ++++++++--- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb_bug14704286.result b/mysql-test/suite/innodb/r/innodb_bug14704286.result index 9703955cfa7..9de42cb01c8 100644 --- a/mysql-test/suite/innodb/r/innodb_bug14704286.result +++ b/mysql-test/suite/innodb/r/innodb_bug14704286.result @@ -1,7 +1,5 @@ use test; drop table if exists t1; -Warnings: -Note 1051 Unknown table 't1' create table t1 (id int primary key, value int, value2 int, value3 int, index(value,value2)) engine=innodb; insert into t1 values @@ -19,6 +17,7 @@ update test.t1 set value2=value2+1, value3=value3+1 where id=12; SET i = i + 1; END WHILE; END| +set autocommit=0; CALL update_t1(); select * from t1; id value value2 value3 @@ -33,11 +32,22 @@ id value value2 value3 18 18 18 18 19 19 19 19 20 20 20 20 +set autocommit=1; +select * from t1; +id value value2 value3 +10 10 10 10 +11 11 11 11 +12 12 5012 5012 +13 13 13 13 +14 14 14 14 +15 15 15 15 +16 16 16 16 +17 17 17 17 +18 18 18 18 +19 19 19 19 +20 20 20 20 select * from t1 force index(value) where value=12; kill query @id; ERROR 70100: Query execution was interrupted -select * from t1 where value = 12; -id value value2 value3 -12 12 12 12 drop procedure if exists update_t1; drop table if exists t1; diff --git a/mysql-test/suite/innodb/t/innodb_bug14704286.test b/mysql-test/suite/innodb/t/innodb_bug14704286.test index bdc2ab94b01..fb5e6b829a1 100644 --- a/mysql-test/suite/innodb/t/innodb_bug14704286.test +++ b/mysql-test/suite/innodb/t/innodb_bug14704286.test @@ -4,8 +4,9 @@ # create test-bed to run test # use test; - +--disable_warnings drop table if exists t1; +--enable_warnings create table t1 (id int primary key, value int, value2 int, value3 int, index(value,value2)) engine=innodb; @@ -47,9 +48,11 @@ BEGIN END| delimiter ;| - +set autocommit=0; CALL update_t1(); select * from t1; +set autocommit=1; +select * from t1; # # Now try to fire select query from connection-1 enforcing @@ -65,6 +68,10 @@ select * from t1 force index(value) where value=12; # select is going to take good time so let's kill query. # connection conn3; +let $wait_condition= + select * from information_schema.processlist where state = 'Sending data' and + info = 'select * from t1 force index(value) where value=12'; +--source include/wait_condition.inc let $ignore= `SELECT @id := $ID`; kill query @id; @@ -74,7 +81,6 @@ kill query @id; connection conn1; --error ER_QUERY_INTERRUPTED reap; -select * from t1 where value = 12; # # clean test-bed.