~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to mysql-test/t/kill.test

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Test KILL and KILL QUERY statements.
 
3
#
 
4
# Killing a connection in an embedded server does not work like in a normal
 
5
# server, if it is waiting for a new statement. In an embedded server, the
 
6
# connection does not read() from a socket, but returns control to the
 
7
# application. 'mysqltest' does not handle the kill request.
 
8
#
 
9
 
 
10
-- source include/not_embedded.inc
 
11
-- source include/have_debug_sync.inc
 
12
-- source include/not_threadpool.inc
 
13
 
 
14
--disable_warnings
 
15
SET DEBUG_SYNC = 'RESET';
 
16
DROP TABLE IF EXISTS t1, t2, t3;
 
17
DROP FUNCTION IF EXISTS MY_KILL;
 
18
--enable_warnings
 
19
 
 
20
delimiter |;
 
21
# Helper function used to repeatedly kill a session.
 
22
CREATE FUNCTION MY_KILL(tid INT) RETURNS INT
 
23
BEGIN
 
24
  DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
 
25
  KILL tid;
 
26
  RETURN (SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = tid);
 
27
END|
 
28
delimiter ;|
 
29
 
 
30
connect (con1, localhost, root,,);
 
31
connect (con2, localhost, root,,);
 
32
 
 
33
# Save id of con1
 
34
connection con1;
 
35
--disable_reconnect
 
36
let $ID= `SELECT @id := CONNECTION_ID()`;
 
37
connection con2;
 
38
let $ignore= `SELECT @id := $ID`;
 
39
connection con1;
 
40
# Signal when this connection is terminating.
 
41
SET DEBUG_SYNC= 'thread_end SIGNAL con1_end';
 
42
# See if we can kill read().
 
43
# Run into read() immediately after hitting 'before_do_command_net_read'.
 
44
SET DEBUG_SYNC= 'before_do_command_net_read SIGNAL con1_read';
 
45
 
 
46
# Kill con1
 
47
connection con2;
 
48
SET DEBUG_SYNC='now WAIT_FOR con1_read';
 
49
# At this point we have no way to figure out, when con1 is blocked in
 
50
# reading from the socket. Sending KILL to early would not terminate
 
51
# con1. So we repeat KILL until con1 terminates.
 
52
let $wait_condition= SELECT MY_KILL(@id);
 
53
--source include/wait_condition.inc
 
54
# If KILL missed the read(), sync point wait will time out.
 
55
SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
 
56
SET DEBUG_SYNC = 'RESET';
 
57
 
 
58
connection con1;
 
59
--error 1053,2006,2013
 
60
SELECT 1;
 
61
 
 
62
--enable_reconnect
 
63
# this should work, and we should have a new connection_id()
 
64
SELECT 1;
 
65
let $ignore= `SELECT @id := $ID`;
 
66
SELECT @id != CONNECTION_ID();
 
67
 
 
68
#make sure the server is still alive
 
69
connection con2;
 
70
SELECT 4;
 
71
connection default;
 
72
 
 
73
--error ER_NOT_SUPPORTED_YET
 
74
KILL (SELECT COUNT(*) FROM mysql.user);
 
75
 
 
76
connection con1;
 
77
let $ID= `SELECT @id := CONNECTION_ID()`;
 
78
connection con2;
 
79
let $ignore= `SELECT @id := $ID`;
 
80
connection con1;
 
81
disable_reconnect;
 
82
# Signal when this connection is terminating.
 
83
SET DEBUG_SYNC= 'thread_end SIGNAL con1_end';
 
84
# See if we can kill the sync point itself.
 
85
# Wait in 'before_do_command_net_read' until killed.
 
86
# It doesn't wait for a signal 'kill' but for to be killed.
 
87
# The signal name doesn't matter here.
 
88
SET DEBUG_SYNC= 'before_do_command_net_read SIGNAL con1_read WAIT_FOR kill';
 
89
connection con2;
 
90
SET DEBUG_SYNC= 'now WAIT_FOR con1_read';
 
91
# Repeat KILL until con1 terminates.
 
92
let $wait_condition= SELECT MY_KILL(@id);
 
93
--source include/wait_condition.inc
 
94
SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
 
95
SET DEBUG_SYNC = 'RESET';
 
96
 
 
97
connection con1;
 
98
--error 1053,2006,2013
 
99
SELECT 1;
 
100
enable_reconnect;
 
101
SELECT 1;
 
102
let $ignore= `SELECT @id := $ID`;
 
103
SELECT @id != CONNECTION_ID();
 
104
connection con2;
 
105
SELECT 4;
 
106
connection default;
 
107
 
 
108
#
 
109
# BUG#14851: killing long running subquery processed via a temporary table.
 
110
#
 
111
 
 
112
CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT);
 
113
CREATE TABLE t2 (id INT UNSIGNED NOT NULL);
 
114
 
 
115
INSERT INTO t1 VALUES
 
116
(0),(0),(0),(0),(0),(0),(0),(0), (0),(0),(0),(0),(0),(0),(0),(0),
 
117
(0),(0),(0),(0),(0),(0),(0),(0), (0),(0),(0),(0),(0),(0),(0),(0),
 
118
(0),(0),(0),(0),(0),(0),(0),(0), (0),(0),(0),(0),(0),(0),(0),(0),
 
119
(0),(0),(0),(0),(0),(0),(0),(0), (0),(0),(0),(0),(0),(0),(0),(0);
 
120
INSERT t1 SELECT 0 FROM t1 AS a1, t1 AS a2 LIMIT 4032;
 
121
 
 
122
INSERT INTO t2 SELECT id FROM t1;
 
123
 
 
124
connection con1;
 
125
let $ID= `SELECT @id := CONNECTION_ID()`;
 
126
connection con2;
 
127
let $ignore= `SELECT @id := $ID`;
 
128
 
 
129
connection con1;
 
130
SET DEBUG_SYNC= 'thread_end SIGNAL con1_end';
 
131
SET DEBUG_SYNC= 'before_acos_function SIGNAL in_sync';
 
132
# This is a very long running query. If this test start failing,
 
133
# it may be necessary to change to an even longer query.
 
134
send SELECT id FROM t1 WHERE id IN
 
135
       (SELECT DISTINCT a.id FROM t2 a, t2 b, t2 c, t2 d
 
136
          GROUP BY ACOS(1/a.id), b.id, c.id, d.id
 
137
          HAVING a.id BETWEEN 10 AND 20);
 
138
 
 
139
connection con2;
 
140
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
 
141
KILL @id;
 
142
SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
 
143
 
 
144
connection con1;
 
145
--error 1317,1053,2006,2013
 
146
reap;
 
147
SELECT 1;
 
148
 
 
149
connection default;
 
150
SET DEBUG_SYNC = 'RESET';
 
151
DROP TABLE t1, t2;
 
152
 
 
153
#
 
154
# Test of blocking of sending ERROR after OK or EOF
 
155
#
 
156
connection con1;
 
157
let $ID= `SELECT @id := CONNECTION_ID()`;
 
158
connection con2;
 
159
let $ignore= `SELECT @id := $ID`;
 
160
connection con1;
 
161
SET DEBUG_SYNC= 'before_acos_function SIGNAL in_sync WAIT_FOR kill';
 
162
send SELECT ACOS(0);
 
163
connection con2;
 
164
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
 
165
KILL QUERY @id;
 
166
connection con1;
 
167
reap;
 
168
SELECT 1;
 
169
SELECT @id = CONNECTION_ID();
 
170
connection default;
 
171
SET DEBUG_SYNC = 'RESET';
 
172
 
 
173
#
 
174
# Bug#27563: Stored functions and triggers wasn't throwing an error when killed.
 
175
#
 
176
CREATE TABLE t1 (f1 INT);
 
177
delimiter |;
 
178
CREATE FUNCTION bug27563() RETURNS INT(11)
 
179
DETERMINISTIC
 
180
BEGIN
 
181
  DECLARE CONTINUE HANDLER FOR SQLSTATE '70100' SET @a:= 'killed';
 
182
  DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET @a:= 'exception';
 
183
  SET DEBUG_SYNC= 'now SIGNAL in_sync WAIT_FOR kill';
 
184
  RETURN 1;
 
185
END|
 
186
delimiter ;|
 
187
# Test stored functions
 
188
# Test INSERT
 
189
connection con1;
 
190
let $ID= `SELECT @id := CONNECTION_ID()`;
 
191
connection con2;
 
192
let $ignore= `SELECT @id := $ID`;
 
193
connection con1;
 
194
send INSERT INTO t1 VALUES (bug27563());
 
195
connection con2;
 
196
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
 
197
KILL QUERY @id;
 
198
connection con1;
 
199
--error 1317
 
200
reap;
 
201
SELECT * FROM t1;
 
202
connection default;
 
203
SET DEBUG_SYNC = 'RESET';
 
204
 
 
205
# Test UPDATE
 
206
INSERT INTO t1 VALUES(0);
 
207
connection con1;
 
208
send UPDATE t1 SET f1= bug27563();
 
209
connection con2;
 
210
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
 
211
KILL QUERY @id;
 
212
connection con1;
 
213
--error 1317
 
214
reap;
 
215
SELECT * FROM t1;
 
216
connection default;
 
217
SET DEBUG_SYNC = 'RESET';
 
218
 
 
219
# Test DELETE
 
220
INSERT INTO t1 VALUES(1);
 
221
connection con1;
 
222
send DELETE FROM t1 WHERE bug27563() IS NULL;
 
223
connection con2;
 
224
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
 
225
KILL QUERY @id;
 
226
connection con1;
 
227
--error 1317
 
228
reap;
 
229
SELECT * FROM t1;
 
230
connection default;
 
231
SET DEBUG_SYNC = 'RESET';
 
232
 
 
233
# Test SELECT
 
234
connection con1;
 
235
send SELECT * FROM t1 WHERE f1= bug27563();
 
236
connection con2;
 
237
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
 
238
KILL QUERY @id;
 
239
connection con1;
 
240
--error 1317
 
241
reap;
 
242
SELECT * FROM t1;
 
243
connection default;
 
244
SET DEBUG_SYNC = 'RESET';
 
245
DROP FUNCTION bug27563;
 
246
 
 
247
# Test TRIGGERS
 
248
CREATE TABLE t2 (f2 INT);
 
249
delimiter |;
 
250
CREATE TRIGGER trg27563 BEFORE INSERT ON t1 FOR EACH ROW
 
251
BEGIN
 
252
  DECLARE CONTINUE HANDLER FOR SQLSTATE '70100' SET @a:= 'killed';
 
253
  DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET @a:= 'exception';
 
254
  INSERT INTO t2 VALUES(0);
 
255
  SET DEBUG_SYNC= 'now SIGNAL in_sync WAIT_FOR kill';
 
256
  INSERT INTO t2 VALUES(1);
 
257
END|
 
258
delimiter ;|
 
259
connection con1;
 
260
send INSERT INTO t1 VALUES(2),(3);
 
261
connection con2;
 
262
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
 
263
KILL QUERY @id;
 
264
connection con1;
 
265
--error 1317
 
266
reap;
 
267
SELECT * FROM t1;
 
268
SELECT * FROM t2;
 
269
connection default;
 
270
SET DEBUG_SYNC = 'RESET';
 
271
DROP TABLE t1, t2;
 
272
 
 
273
#
 
274
# Bug#28598: mysqld crash when killing a long-running explain query.
 
275
#
 
276
connection con1;
 
277
let $ID= `SELECT @id := CONNECTION_ID()`;
 
278
connection con2;
 
279
let $ignore= `SELECT @id := $ID`;
 
280
connection con1;
 
281
--disable_query_log
 
282
let $tab_count= 40;
 
283
 
 
284
let $i= $tab_count;
 
285
while ($i)
 
286
{
 
287
  eval CREATE TABLE t$i (a$i INT, KEY(a$i));
 
288
  eval INSERT INTO t$i VALUES (1),(2),(3),(4),(5),(6),(7);
 
289
  dec $i ;
 
290
}
 
291
SET SESSION optimizer_search_depth=0;
 
292
 
 
293
let $i=$tab_count;
 
294
while ($i)
 
295
{
 
296
  let $a= a$i;
 
297
  let $t= t$i;
 
298
  dec $i;
 
299
  if ($i)
 
300
  {
 
301
    let $comma=,;
 
302
    let $from=$comma$t$from;
 
303
    let $where=a$i=$a $and $where;
 
304
  }
 
305
  if (!$i)
 
306
  {
 
307
    let $from=FROM $t$from;
 
308
    let $where=WHERE $where;
 
309
  }
 
310
  let $and=AND;
 
311
}
 
312
 
 
313
--enable_query_log
 
314
SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync';
 
315
eval PREPARE stmt FROM 'EXPLAIN SELECT * $from $where';
 
316
send EXECUTE stmt;
 
317
 
 
318
connection con2;
 
319
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
 
320
KILL QUERY @id;
 
321
connection con1;
 
322
--error 1317
 
323
reap;
 
324
--disable_query_log
 
325
let $i= $tab_count;
 
326
while ($i)
 
327
{
 
328
  eval DROP TABLE t$i;
 
329
  dec $i ;
 
330
}
 
331
--enable_query_log
 
332
connection default;
 
333
SET DEBUG_SYNC = 'RESET';
 
334
 
 
335
--echo #
 
336
--echo # Bug#19723: kill of active connection yields different error code
 
337
--echo # depending on platform.
 
338
--echo #
 
339
 
 
340
--echo
 
341
--echo # Connection: con1.
 
342
--connection con1
 
343
let $ID= `SELECT @id := CONNECTION_ID()`;
 
344
SET DEBUG_SYNC= 'thread_end SIGNAL con1_end';
 
345
--disable_reconnect
 
346
--error ER_QUERY_INTERRUPTED
 
347
KILL @id;
 
348
 
 
349
connection con2;
 
350
SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
 
351
connection con1;
 
352
--echo # ER_SERVER_SHUTDOWN, CR_SERVER_GONE_ERROR, CR_SERVER_LOST,
 
353
--echo # depending on the timing of close of the connection socket
 
354
--error 1053,2006,2013
 
355
SELECT 1;
 
356
--enable_reconnect
 
357
SELECT 1;
 
358
let $ignore= `SELECT @id := $ID`;
 
359
SELECT @id != CONNECTION_ID();
 
360
connection default;
 
361
SET DEBUG_SYNC = 'RESET';
 
362
 
 
363
--echo #
 
364
--echo # Additional test for WL#3726 "DDL locking for all metadata objects"
 
365
--echo # Check that DDL and DML statements waiting for metadata locks can
 
366
--echo # be killed. Note that we don't cover all situations here since it
 
367
--echo # can be tricky to write test case for some of them (e.g. REPAIR or
 
368
--echo # ALTER and other statements under LOCK TABLES).
 
369
--echo #
 
370
--disable_warnings
 
371
drop tables if exists t1, t2, t3;
 
372
--enable_warnings
 
373
 
 
374
create table t1 (i int primary key);
 
375
connect (blocker, localhost, root, , );
 
376
connect (dml, localhost, root, , );
 
377
connect (ddl, localhost, root, , );
 
378
 
 
379
--echo # Test for RENAME TABLE
 
380
--echo # Switching to connection 'blocker'
 
381
connection blocker;
 
382
lock table t1 read;
 
383
--echo # Switching to connection 'ddl'
 
384
connection ddl;
 
385
let $ID= `select connection_id()`;
 
386
--send rename table t1 to t2
 
387
--echo # Switching to connection 'default'
 
388
connection default;
 
389
let $wait_condition=
 
390
  select count(*) = 1 from information_schema.processlist
 
391
  where state = "Waiting for table metadata lock" and
 
392
        info = "rename table t1 to t2";
 
393
--source include/wait_condition.inc
 
394
--replace_result $ID ID
 
395
eval kill query $ID;
 
396
--echo # Switching to connection 'ddl'
 
397
connection ddl;
 
398
--error ER_QUERY_INTERRUPTED
 
399
--reap
 
400
 
 
401
--echo # Test for DROP TABLE
 
402
--send drop table t1
 
403
--echo # Switching to connection 'default'
 
404
connection default;
 
405
let $wait_condition=
 
406
  select count(*) = 1 from information_schema.processlist
 
407
  where state = "Waiting for table metadata lock" and
 
408
        info = "drop table t1";
 
409
--source include/wait_condition.inc
 
410
--replace_result $ID ID
 
411
eval kill query $ID;
 
412
--echo # Switching to connection 'ddl'
 
413
connection ddl;
 
414
--error ER_QUERY_INTERRUPTED
 
415
--reap
 
416
 
 
417
--echo # Test for CREATE TRIGGER
 
418
--send create trigger t1_bi before insert on t1 for each row set @a:=1
 
419
--echo # Switching to connection 'default'
 
420
connection default;
 
421
let $wait_condition=
 
422
  select count(*) = 1 from information_schema.processlist
 
423
  where state = "Waiting for table metadata lock" and
 
424
        info = "create trigger t1_bi before insert on t1 for each row set @a:=1";
 
425
--source include/wait_condition.inc
 
426
--replace_result $ID ID
 
427
eval kill query $ID;
 
428
--echo # Switching to connection 'ddl'
 
429
connection ddl;
 
430
--error ER_QUERY_INTERRUPTED
 
431
--reap
 
432
 
 
433
--echo #
 
434
--echo # Tests for various kinds of ALTER TABLE
 
435
--echo #
 
436
--echo # Full-blown ALTER which should copy table
 
437
--send alter table t1 add column j int
 
438
--echo # Switching to connection 'default'
 
439
connection default;
 
440
let $wait_condition=
 
441
  select count(*) = 1 from information_schema.processlist
 
442
  where state = "Waiting for table metadata lock" and
 
443
        info = "alter table t1 add column j int";
 
444
--source include/wait_condition.inc
 
445
--replace_result $ID ID
 
446
eval kill query $ID;
 
447
--echo # Switching to connection 'ddl'
 
448
connection ddl;
 
449
--error ER_QUERY_INTERRUPTED
 
450
--reap
 
451
 
 
452
--echo # Two kinds of simple ALTER
 
453
--send alter table t1 rename to t2
 
454
--echo # Switching to connection 'default'
 
455
connection default;
 
456
let $wait_condition=
 
457
  select count(*) = 1 from information_schema.processlist
 
458
  where state = "Waiting for table metadata lock" and
 
459
        info = "alter table t1 rename to t2";
 
460
--source include/wait_condition.inc
 
461
--replace_result $ID ID
 
462
eval kill query $ID;
 
463
--echo # Switching to connection 'ddl'
 
464
connection ddl;
 
465
--error ER_QUERY_INTERRUPTED
 
466
--reap
 
467
--send alter table t1 disable keys
 
468
--echo # Switching to connection 'default'
 
469
connection default;
 
470
let $wait_condition=
 
471
  select count(*) = 1 from information_schema.processlist
 
472
  where state = "Waiting for table metadata lock" and
 
473
        info = "alter table t1 disable keys";
 
474
--source include/wait_condition.inc
 
475
--replace_result $ID ID
 
476
eval kill query $ID;
 
477
--echo # Switching to connection 'ddl'
 
478
connection ddl;
 
479
--error ER_QUERY_INTERRUPTED
 
480
--reap
 
481
--echo # Fast ALTER
 
482
--send alter table t1 alter column i set default 100
 
483
--echo # Switching to connection 'default'
 
484
connection default;
 
485
let $wait_condition=
 
486
  select count(*) = 1 from information_schema.processlist
 
487
  where state = "Waiting for table metadata lock" and
 
488
        info = "alter table t1 alter column i set default 100";
 
489
--source include/wait_condition.inc
 
490
--replace_result $ID ID
 
491
eval kill query $ID;
 
492
--echo # Switching to connection 'ddl'
 
493
connection ddl;
 
494
--error ER_QUERY_INTERRUPTED
 
495
--reap
 
496
--echo # Special case which is triggered only for MERGE tables.
 
497
--echo # Switching to connection 'blocker'
 
498
connection blocker;
 
499
unlock tables;
 
500
create table t2 (i int primary key) engine=merge union=(t1);
 
501
lock tables t2 read;
 
502
--echo # Switching to connection 'ddl'
 
503
connection ddl;
 
504
--send alter table t2 alter column i set default 100
 
505
--echo # Switching to connection 'default'
 
506
connection default;
 
507
let $wait_condition=
 
508
  select count(*) = 1 from information_schema.processlist
 
509
  where state = "Waiting for table metadata lock" and
 
510
        info = "alter table t2 alter column i set default 100";
 
511
--source include/wait_condition.inc
 
512
--replace_result $ID ID
 
513
eval kill query $ID;
 
514
--echo # Switching to connection 'ddl'
 
515
connection ddl;
 
516
--error ER_QUERY_INTERRUPTED
 
517
--reap
 
518
 
 
519
--echo # Test for DML waiting for meta-data lock
 
520
--echo # Switching to connection 'blocker'
 
521
connection blocker;
 
522
unlock tables;
 
523
lock tables t1 read;
 
524
--echo # Switching to connection 'ddl'
 
525
connection ddl;
 
526
# Let us add pending exclusive metadata lock on t2
 
527
--send truncate table t1
 
528
--echo # Switching to connection 'dml'
 
529
connection dml;
 
530
let $wait_condition=
 
531
  select count(*) = 1 from information_schema.processlist
 
532
  where state = "Waiting for table metadata lock" and
 
533
        info = "truncate table t1";
 
534
--source include/wait_condition.inc
 
535
let $ID2= `select connection_id()`;
 
536
--send insert into t1 values (1)
 
537
--echo # Switching to connection 'default'
 
538
connection default;
 
539
let $wait_condition=
 
540
  select count(*) = 1 from information_schema.processlist
 
541
  where state = "Waiting for table metadata lock" and
 
542
        info = "insert into t1 values (1)";
 
543
--source include/wait_condition.inc
 
544
--replace_result $ID2 ID2
 
545
eval kill query $ID2;
 
546
--echo # Switching to connection 'dml'
 
547
connection dml;
 
548
--error ER_QUERY_INTERRUPTED
 
549
--reap
 
550
--echo # Switching to connection 'blocker'
 
551
connection blocker;
 
552
unlock tables;
 
553
--echo # Switching to connection 'ddl'
 
554
connection ddl;
 
555
--reap
 
556
 
 
557
--echo # Test for DML waiting for tables to be flushed
 
558
--echo # Switching to connection 'blocker'
 
559
connection blocker;
 
560
lock tables t1 read;
 
561
--echo # Switching to connection 'ddl'
 
562
connection ddl;
 
563
--echo # Let us mark locked table t1 as old
 
564
--send flush tables
 
565
--echo # Switching to connection 'dml'
 
566
connection dml;
 
567
let $wait_condition=
 
568
  select count(*) = 1 from information_schema.processlist
 
569
  where state = "Waiting for table flush" and
 
570
        info = "flush tables";
 
571
--source include/wait_condition.inc
 
572
--send select * from t1
 
573
--echo # Switching to connection 'default'
 
574
connection default;
 
575
let $wait_condition=
 
576
  select count(*) = 1 from information_schema.processlist
 
577
  where state = "Waiting for table flush" and
 
578
        info = "select * from t1";
 
579
--source include/wait_condition.inc
 
580
--replace_result $ID2 ID2
 
581
eval kill query $ID2;
 
582
--echo # Switching to connection 'dml'
 
583
connection dml;
 
584
--error ER_QUERY_INTERRUPTED
 
585
--reap
 
586
--echo # Switching to connection 'blocker'
 
587
connection blocker;
 
588
unlock tables;
 
589
--echo # Switching to connection 'ddl'
 
590
connection ddl;
 
591
--reap
 
592
 
 
593
--echo # Cleanup.
 
594
--echo # Switching to connection 'default'
 
595
connection default;
 
596
drop table t1;
 
597
drop table t2;
 
598
 
 
599
###########################################################################
 
600
 
 
601
SET DEBUG_SYNC = 'RESET';
 
602
DROP FUNCTION MY_KILL;