77 lines
2.4 KiB
Plaintext
77 lines
2.4 KiB
Plaintext
--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_ndb_info_check
|
|
--source include/add_debug_point.inc
|
|
connection master;
|
|
--let $debug_point= extra_row_ndb_info_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_ndb_info.out
|
|
|
|
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/rpl_extra_row_ndb_info.out' into table raw_data columns terminated by '\n';
|
|
--enable_query_log
|
|
|
|
select replace(txt, '\r', '') from raw_data where txt like '%### Extra row ndb info: data_format:%' order by txt;
|
|
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_extra_row_ndb_info.out
|
|
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_ndb_info_check
|
|
--source include/remove_debug_point.inc
|
|
connection master;
|
|
--let $debug_point= extra_row_ndb_info_set
|
|
--source include/remove_debug_point.inc
|
|
--source include/rpl_end.inc
|