| 1 |
# Test for BUG#26551 |
| 2 |
# |
| 3 |
|
| 4 |
# This test is unfortunately very fragile and very dependent on the |
| 5 |
# load of the computer. The test is therefore disabled normally. It is |
| 6 |
# entered here to demonstrate how to check that the bug is actually |
| 7 |
# solved. |
| 8 |
source include/force_myisam_default.inc; |
| 9 |
source include/have_myisam.inc; |
| 10 |
|
| 11 |
--echo Turn on parsing to run this test |
| 12 |
|
| 13 |
disable_testcase BUG#0000; |
| 14 |
|
| 15 |
--source include/not_group_replication_plugin.inc |
| 16 |
source include/master-slave.inc; |
| 17 |
|
| 18 |
connection master; |
| 19 |
CREATE TABLE t1 (data LONGBLOB) ENGINE=MYISAM; |
| 20 |
CREATE TABLE t2 (data LONGBLOB) ENGINE=MYISAM; |
| 21 |
|
| 22 |
INSERT INTO t1 (data) VALUES (repeat('a',1024*1024)); |
| 23 |
INSERT INTO t1 SELECT * FROM t1; |
| 24 |
INSERT INTO t1 SELECT * FROM t1; |
| 25 |
INSERT INTO t1 SELECT * FROM t1; |
| 26 |
INSERT INTO t1 SELECT * FROM t1; |
| 27 |
INSERT INTO t1 SELECT * FROM t1; |
| 28 |
INSERT INTO t1 SELECT * FROM t1; |
| 29 |
INSERT INTO t1 SELECT * FROM t1; |
| 30 |
INSERT INTO t1 SELECT * FROM t1; |
| 31 |
--source include/sync_slave_sql_with_master.inc |
| 32 |
|
| 33 |
connection master; |
| 34 |
send INSERT INTO t2 SELECT * FROM t1; |
| 35 |
|
| 36 |
connection master1; |
| 37 |
|
| 38 |
# This sleep is picked so that the query above has started to insert |
| 39 |
# some rows into t2. If it hasn't the slave will not stop below. |
| 40 |
let $wait_condition= SELECT COUNT(*) > 1000 FROM t1; |
| 41 |
--source include/wait_condition_or_abort.inc |
| 42 |
|
| 43 |
# SHOW PROCESSLIST; |
| 44 |
|
| 45 |
# Code for the 5.1 server to get the thread id of the thread executing |
| 46 |
# the query above. |
| 47 |
# |
| 48 |
#SET @id = 0; |
| 49 |
#SELECT id INTO @id |
| 50 |
# FROM information_schema.processlist |
| 51 |
# WHERE info LIKE 'INSERT INTO t2%'; |
| 52 |
|
| 53 |
# This is the connection that is executing the INSERT INTO t2... |
| 54 |
KILL QUERY 2; |
| 55 |
|
| 56 |
connection slave; |
| 57 |
|
| 58 |
# Here the slave will only stop if the query above actually started |
| 59 |
# inserting some rows into t2. Otherwise, it will hang forever. ... and there |
| 60 |
# the error code should be 1317 (ER_QUERY_INTERRUPTED) |
| 61 |
--let $slave_sql_errno= 1317 |
| 62 |
--let $show_slave_sql_error= 1 |
| 63 |
--source include/wait_for_slave_sql_error.inc |
| 64 |
|
| 65 |
# The following should be 0 |
| 66 |
SELECT COUNT(*) FROM t2; |
| 67 |
|
| 68 |
--source include/rpl_end.inc |
| 69 |
enable_testcase; |