1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
connection slave;
STOP SLAVE;
source include/wait_for_slave_to_stop.inc;
connection master;
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
connection slave;
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
RESET SLAVE;
START SLAVE;
--echo **** On Master ****
connection master;
eval SET SESSION BINLOG_FORMAT=$format;
eval SET GLOBAL BINLOG_FORMAT=$format;
eval CREATE TABLE t1 (a INT, b LONG) ENGINE=$engine;
INSERT INTO t1 VALUES (1,1), (2,2);
SELECT * FROM t1;
--echo **** On Slave ****
sync_slave_with_master;
INSERT INTO t1 VALUE (3,3);
SELECT * FROM t1;
--echo **** On Master ****
connection master;
eval $stmt t1;
SELECT * FROM t1;
--echo **** On Slave ****
sync_slave_with_master;
# Should be empty
SELECT * FROM t1;
--echo **** On Master ****
connection master;
DROP TABLE t1;
let $SERVER_VERSION=`select version()`;
source include/show_binlog_events.inc;
connection master;
RESET MASTER;
|