~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- source include/have_binlog_format_mixed_or_statement.inc
 
2
-- source include/not_ndb_default.inc
 
3
-- source include/master-slave.inc
 
4
 
 
5
# Test that the slave temporarily switches to ROW when seeing binrow
 
6
# events when it is in STATEMENT or MIXED mode
 
7
 
 
8
SET BINLOG_FORMAT=MIXED;
 
9
SET GLOBAL BINLOG_FORMAT=MIXED;
 
10
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
 
11
 
 
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: #/
 
20
SHOW BINLOG EVENTS;
 
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: #/
 
29
SHOW BINLOG EVENTS;
 
30
 
 
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
 
33
 
 
34
connection master;
 
35
DROP TABLE IF EXISTS t1;
 
36
 
 
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
 
41
 
 
42
diff_files $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql;
 
43
 
 
44
# If all is good, we can remove the files
 
45
 
 
46
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql
 
47
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql