3 # Kill a query in the master connection, and then try to reap the
4 # result of the killed query.
8 # The following variables should be set before sourcing this file.
10 # $debug_lock: name of the debug user lock, if set, will release/lock
11 # the specified debug lock accordingly, and before
12 # sourcing this, connection 'master' should get the user
13 # lock and run a query in another thread, which will
14 # block before creating statement event.
16 # $connection_name: name of the connection that is waiting for the
17 # lock, this can not be 'master'
19 # $connection_id: id of the connection that is waiting for the lock
24 # let $connection_name= master1;
25 # let $connection_id= `SELECT CONNECTION_ID()`;
26 # send CREATE TABLE t1;
27 # source kill_query.inc;
29 # let $debug_lock= "debug_lock.before_query_log_event";
31 # eval SELECT GET_LOCK($debug_lock, 10);
33 # let $connection_name= master1;
34 # let $connection_id= `SELECT CONNECTION_ID()`;
35 # send CREATE TABLE t1;
36 # source kill_query.inc;
39 --echo source include/kill_query.inc;
44 # kill the query that is waiting
49 # release the lock to allow binlog continue
50 eval SELECT RELEASE_LOCK($debug_lock);
53 # reap the result of the waiting query
54 connection $connection_name;
55 error 0, 1317, 1307, 1306, 1334, 1305, 1034;
62 # get lock again to make the next query wait
63 eval SELECT GET_LOCK($debug_lock, 10);
66 connection $connection_name;