| 1 |
--echo # Bug#47699 rpl.rpl_backup_block fails sporadically |
| 2 |
--echo # |
| 3 |
--echo # START SLAVE released the lock and returned before it cleared the error, |
| 4 |
--echo # so there is a possibility that Slave_SQL_Error is not 0. |
| 5 |
--source include/not_group_replication_plugin.inc |
| 6 |
source include/have_debug_sync.inc; |
| 7 |
source include/master-slave.inc; |
| 8 |
|
| 9 |
--echo [on slave] |
| 10 |
connection slave; |
| 11 |
|
| 12 |
CALL mtr.add_suppression("Replica: Table 't1' already exists Error_code: MY-001050"); |
| 13 |
CALL mtr.add_suppression("Replica SQL for channel '': .*Error .Table .t1. already exists. on query.* Error_code: MY-001050"); |
| 14 |
call mtr.add_suppression("The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state"); |
| 15 |
|
| 16 |
--echo # The statement makes SQL thread to fail. |
| 17 |
CREATE TABLE t1(c1 INT); |
| 18 |
|
| 19 |
--echo [on master] |
| 20 |
connection master; |
| 21 |
CREATE TABLE t1(c1 INT); |
| 22 |
|
| 23 |
--echo [on slave] |
| 24 |
connection slave; |
| 25 |
# ERROR: Table already exists. |
| 26 |
let $slave_sql_errno= 1050; |
| 27 |
source include/wait_for_slave_sql_error.inc; |
| 28 |
|
| 29 |
DROP TABLE t1; |
| 30 |
|
| 31 |
--echo # Block SQL thread immediately after it starts. |
| 32 |
SET DEBUG_SYNC='after_start_replica WAIT_FOR signal.continue'; |
| 33 |
START SLAVE SQL_THREAD; |
| 34 |
source include/wait_for_slave_sql_to_start.inc; |
| 35 |
--echo # Check Slave_SQL_Error, there should not be an error. |
| 36 |
source include/check_slave_no_error.inc; |
| 37 |
|
| 38 |
--echo # Resume SQL thread |
| 39 |
SET DEBUG_SYNC="now SIGNAL signal.continue"; |
| 40 |
|
| 41 |
--echo [on master] |
| 42 |
connection master; |
| 43 |
DROP TABLE t1; |
| 44 |
source include/rpl_end.inc; |