~vkolesnikov/pbxt/pbxt-07-diskfull

« back to all changes in this revision

Viewing changes to pbxt/mysql-test-update/mysql-test/t/rpl_rbr_to_sbr.test

  • Committer: paul-mccullagh
  • Date: 2006-10-23 09:14:04 UTC
  • Revision ID: paul-mccullagh-918861e03d351978a9541168a96e58cc826734ee
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- source include/have_row_based.inc
 
2
-- source include/have_binlog_format_statement.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
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
 
10
SET GLOBAL BINLOG_FORMAT=MIXED;
 
11
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
 
12
 
 
13
--echo **** On Master ****
 
14
CREATE TABLE t1 (a INT, b LONG);
 
15
INSERT INTO t1 VALUES (1,1), (2,2);
 
16
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
 
17
let $VERSION=`select version()`;
 
18
--replace_result $VERSION VERSION
 
19
--replace_column 2 # 5 #
 
20
--replace_regex /table_id: [0-9]+/table_id: #/
 
21
SHOW BINLOG EVENTS;
 
22
sync_slave_with_master;
 
23
--echo **** On Slave ****
 
24
--replace_result $MASTER_MYPORT MASTER_PORT
 
25
--replace_column 1 # 8 # 9 # 23 # 33 #
 
26
--query_vertical SHOW SLAVE STATUS
 
27
--replace_result $VERSION VERSION
 
28
--replace_column 2 # 5 #
 
29
--replace_regex /table_id: [0-9]+/table_id: #/
 
30
SHOW BINLOG EVENTS;
 
31
 
 
32
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql
 
33
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql
 
34
 
 
35
connection master;
 
36
DROP TABLE IF EXISTS t1;
 
37
 
 
38
# Let's compare. Note: If they match test will pass, if they do not match
 
39
# the test will show that the diff statement failed and not reject file
 
40
# will be created. You will need to go to the mysql-test dir and diff
 
41
# the files your self to see what is not matching
 
42
 
 
43
--exec diff $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql;
 
44
 
 
45
# If all is good, we can remove the files
 
46
 
 
47
system rm $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql;
 
48
system rm $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql;