1
-- source include/have_binlog_format_mixed_or_statement.inc
2
-- source include/not_ndb_default.inc
3
-- source include/master-slave.inc
5
# Test that the slave temporarily switches to ROW when seeing binrow
6
# events when it is in STATEMENT or MIXED mode
8
SET BINLOG_FORMAT=MIXED;
9
SET GLOBAL BINLOG_FORMAT=MIXED;
10
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
12
--echo **** On Master ****
13
CREATE TABLE t1 (a INT, b LONG);
14
INSERT INTO t1 VALUES (1,1), (2,2);
15
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
16
let $VERSION=`select version()`;
17
--replace_result $VERSION VERSION
18
--replace_column 2 # 5 #
19
--replace_regex /table_id: [0-9]+/table_id: #/
21
sync_slave_with_master;
22
--echo **** On Slave ****
23
--replace_result $MASTER_MYPORT MASTER_PORT
24
--replace_column 1 # 8 # 9 # 23 # 33 # 34 # 35 #
25
--query_vertical SHOW SLAVE STATUS
26
--replace_result $VERSION VERSION
27
--replace_column 2 # 5 #
28
--replace_regex /table_id: [0-9]+/table_id: #/
31
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql
32
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql
35
DROP TABLE IF EXISTS t1;
37
# Let's compare. Note: If they match test will pass, if they do not match
38
# the test will show that the diff statement failed and not reject file
39
# will be created. You will need to go to the mysql-test dir and diff
40
# the files your self to see what is not matching
42
diff_files $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql;
44
# If all is good, we can remove the files
46
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql
47
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql