Skip to content

Commit b04748c

Browse files
author
Sergei Golubchik
committed
fix intermittent failures of main.create_or_replace test in buildbot
don't kill statements in the default connection, kill them in a connection that will be closed - it'll guarantee that `KILL con_id` will not apply to unrelated statements.
1 parent a006813 commit b04748c

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

mysql-test/r/create_or_replace.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,9 @@ unlock tables;
434434
CREATE TABLE t1 (col_int_nokey INT) ENGINE=InnoDB;
435435
CREATE OR REPLACE TEMPORARY TABLE tmp LIKE t1;
436436
LOCK TABLE t1 WRITE;
437-
CREATE OR REPLACE TABLE t1 LIKE tmp;;
437+
CREATE OR REPLACE TABLE t1 LIKE tmp;
438438
KILL QUERY con_id;
439-
CREATE OR REPLACE TABLE t1 (a int);;
439+
CREATE OR REPLACE TABLE t1 (a int);
440440
KILL QUERY con_id;
441441
drop table t1;
442442
DROP TABLE t2;

mysql-test/t/create_or_replace.test

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -339,31 +339,31 @@ unlock tables;
339339

340340
CREATE TABLE t1 (col_int_nokey INT) ENGINE=InnoDB;
341341

342-
--let $con_id = `SELECT CONNECTION_ID()`
343342
CREATE OR REPLACE TEMPORARY TABLE tmp LIKE t1;
344343
LOCK TABLE t1 WRITE;
345344

346345
--connect (con1,localhost,root,,test)
347-
346+
--let $con_id = `SELECT CONNECTION_ID()`
347+
--send CREATE OR REPLACE TABLE t1 LIKE tmp
348348
--connection default
349-
--send CREATE OR REPLACE TABLE t1 LIKE tmp;
350-
--connection con1
351349
--replace_result $con_id con_id
352-
eval KILL QUERY $con_id;
350+
--eval KILL QUERY $con_id
353351

354-
--connection default
352+
--connection con1
355353
--error 0,ER_QUERY_INTERRUPTED
356354
--reap
357-
--send CREATE OR REPLACE TABLE t1 (a int);
355+
--send CREATE OR REPLACE TABLE t1 (a int)
358356

359-
--connection con1
357+
--connection default
360358
--replace_result $con_id con_id
361-
eval KILL QUERY $con_id;
359+
--eval KILL QUERY $con_id
362360

363-
--connection default
361+
--connection con1
364362
--error 0,ER_QUERY_INTERRUPTED
365363
--reap
366364
--disconnect con1
365+
--connection default
366+
367367
drop table t1;
368368

369369
#

0 commit comments

Comments
 (0)