Current Path : /home/usr.opt/mysql57/mysql-test/suite/rpl/t/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/rpl/t/rpl_extra_row_data.test |
--source include/not_group_replication_plugin.inc --source include/have_debug.inc --source include/have_binlog_format_row.inc --source include/master-slave.inc connection slave; --let $debug_point_silent= 1 --let $debug_point= extra_row_data_check --source include/add_debug_point.inc connection master; --let $debug_point= extra_row_data_set --source include/add_debug_point.inc --echo Basic insert, update, delete from Master->Slave --echo DBUG code will set + check transfer of extra --echo row data in RBR --echo **** On Master **** CREATE TABLE t1 (a INT); --echo Ten inserts in one transaction -> 1 epoch transaction BEGIN; INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); COMMIT; --echo Wait for Binlog-on-disk flush logs; --echo Check that we have the expected extra row data in the Binlog create table raw_data(txt varchar(1000)); --disable_query_log let $MYSQLD_DATADIR= `select @@datadir;`; --exec $MYSQL_BINLOG --verbose $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/rpl_extra_row_data.out --eval load data local infile '$MYSQLTEST_VARDIR/tmp/rpl_extra_row_data.out' into table raw_data columns terminated by '\n'; --enable_query_log select replace(txt, '\r', '') from raw_data where txt like '%### Extra row data format%' order by txt; drop table raw_data; --echo Generate some more insert, update, delete traffic INSERT INTO t1 SELECT a+10 FROM t1; INSERT INTO t1 SELECT a+20 FROM t1; INSERT INTO t1 SELECT a+40 FROM t1; # 80 rows, 80 inserts UPDATE t1 SET a = a+1; UPDATE t1 SET a = a+1; UPDATE t1 SET a = a+1; UPDATE t1 SET a = a+1; UPDATE t1 SET a = a+1; # 5 Updates of 80 rows = 400 updates, enough to show all potential lengths # of Binlog extra row data including 0 + 255. # 10 deletes DELETE FROM t1 WHERE a > 390; #show binlog events; #let $MYSQLD_DATADIR= `select @@datadir;`; #--exec $MYSQL_BINLOG --verbose $MYSQLD_DATADIR/master-bin.000001 --echo **** On Slave **** --source include/sync_slave_sql_with_master.inc connection slave; --echo Check row count and that slave is running ok SELECT count(*) from t1; source include/check_slave_is_running.inc; connection master; DROP TABLE t1; --source include/sync_slave_sql_with_master.inc --let $debug_point= extra_row_data_check --source include/remove_debug_point.inc connection master; --let $debug_point= extra_row_data_set --source include/remove_debug_point.inc --source include/rpl_end.inc