| 1 |
# ==== Purpose ==== |
| 2 |
# |
| 3 |
# Check that the slave does not crash with an assertion when replicating an |
| 4 |
# empty crash-safe DDL when the binlog is not enabled. |
| 5 |
# |
| 6 |
# ==== Implementation ==== |
| 7 |
# |
| 8 |
# Generate empty DDL's using two methods: |
| 9 |
# A. Create a filter on the slave and replicate DDL that will be ignored due to |
| 10 |
# that filter. |
| 11 |
# B. Replicate `DROP TRIGGER IF EXISTS` using an unexisting database. |
| 12 |
# |
| 13 |
# ==== References ==== |
| 14 |
# |
| 15 |
# BUG#27164661 SLAVE ASSERTS ON DROP TRIGGER IF EXISTS |
| 16 |
|
| 17 |
# no need to run in other binlog formats |
| 18 |
--source include/have_binlog_format_row.inc |
| 19 |
--source include/master-slave.inc |
| 20 |
|
| 21 |
--source include/rpl_connection_slave.inc |
| 22 |
# warning issued because we are using have_binlog_format_row.inc |
| 23 |
CALL mtr.add_suppression("You need to use --log-bin to make --binlog-format work"); |
| 24 |
|
| 25 |
# |
| 26 |
# A. Generate an empty transaction due to replication filters |
| 27 |
# |
| 28 |
|
| 29 |
--source include/stop_slave_sql.inc |
| 30 |
CHANGE REPLICATION FILTER Replicate_Do_DB= (test1); |
| 31 |
|
| 32 |
--source include/rpl_connection_master.inc |
| 33 |
CREATE TABLE test.t1 (a INT); |
| 34 |
|
| 35 |
--source include/rpl_connection_slave.inc |
| 36 |
--source include/start_slave_sql.inc |
| 37 |
--source include/rpl_connection_master.inc |
| 38 |
# the slave will not hit a debug assert |
| 39 |
--source include/sync_slave_sql_with_master.inc |
| 40 |
|
| 41 |
# remove filter |
| 42 |
--source include/stop_slave_sql.inc |
| 43 |
CHANGE REPLICATION FILTER REPLICATE_DO_DB= (); |
| 44 |
--source include/start_slave_sql.inc |
| 45 |
|
| 46 |
# |
| 47 |
# B. Generate an empty transaction due to an unexisting database |
| 48 |
# |
| 49 |
|
| 50 |
--source include/rpl_connection_master.inc |
| 51 |
DROP TRIGGER IF EXISTS test1.trig_t1; |
| 52 |
|
| 53 |
# synchronize master and slave using executed GTID set to verify that master and |
| 54 |
# slave executed exactly the same transactions |
| 55 |
--let $wait_for_executed_gtid_set= 1 |
| 56 |
# the slave will not hit a debug assert |
| 57 |
--source include/sync_slave_sql_with_master.inc |
| 58 |
|
| 59 |
# clean up |
| 60 |
--source include/rpl_connection_master.inc |
| 61 |
DROP TABLE IF EXISTS t1; |
| 62 |
--source include/sync_slave_sql_with_master.inc |
| 63 |
|
| 64 |
--source include/rpl_end.inc |