| 1 |
--source include/have_debug.inc |
| 2 |
--source include/master-slave.inc |
| 3 |
|
| 4 |
connection master; |
| 5 |
SET GLOBAL BINLOG_CHECKSUM=NONE; |
| 6 |
connection slave; |
| 7 |
SET GLOBAL BINLOG_CHECKSUM=NONE; |
| 8 |
connection master; |
| 9 |
|
| 10 |
--echo **** On Master **** |
| 11 |
CREATE TABLE t1 (a INT); |
| 12 |
|
| 13 |
INSERT INTO t1 VALUES (1),(2),(3); |
| 14 |
SELECT * FROM t1; |
| 15 |
|
| 16 |
# This will generate an incident log event and store it in the binary |
| 17 |
# log before the replace statement. |
| 18 |
REPLACE INTO t1 VALUES (4); |
| 19 |
|
| 20 |
--sync_slave_with_master |
| 21 |
|
| 22 |
# Now, we should have inserted the row into the table and the slave |
| 23 |
# should be running. We should also have rotated to a new binary log. |
| 24 |
|
| 25 |
SELECT * FROM t1; |
| 26 |
source include/check_slave_is_running.inc; |
| 27 |
|
| 28 |
connection master; |
| 29 |
|
| 30 |
--echo Should have two binary logs here |
| 31 |
--source include/show_binary_logs.inc |
| 32 |
DROP TABLE t1; |
| 33 |
--sync_slave_with_master |
| 34 |
|
| 35 |
|
| 36 |
connection master; |
| 37 |
SET GLOBAL BINLOG_CHECKSUM=default; |
| 38 |
connection slave; |
| 39 |
SET GLOBAL BINLOG_CHECKSUM=default; |
| 40 |
connection master; |
| 41 |
|
| 42 |
--source include/rpl_end.inc |