Debian Codegraph @

mysql-test/suite/rpl/t/rpl_row_big_table_id.test

raw
1 ##################################################################
2 # rpl_row_big_table_id
3 #
4 # MDEV-17803 Row-based event is not applied when
5 # table map id is greater 32 bit int
6 #
7 # This test is depending on that the server was restarted before test was run
8 #
9 # Verify row-based events applying when table map id value is about and greater
10 # than 1 << 32.
11 ##################################################################
12 --source include/not_valgrind.inc
13 --source include/word_size.inc
14 --source include/have_debug.inc
15 --source include/have_binlog_format_row.inc
16 --source include/master-slave.inc
17
18 SET @old_debug_dbug= @@debug_dbug;
19 SET @@debug_dbug="+d,simulate_big_table_id";
20 CREATE TABLE t (a int);
21
22 --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
23 --let $binlog_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
24 INSERT INTO t SET a= 0;
25 ALTER TABLE t comment '';
26 INSERT INTO t SET a= 1;
27 ALTER TABLE t comment '';
28 INSERT INTO t SET a= 2;
29 ALTER TABLE t comment '';
30 INSERT INTO t SET a= 3;
31
32 # display simulated big table_id
33 --let $_in_from=in '$binlog_file' from $binlog_pos
34 --replace_result "$_in_from" "in <file> from <pos>"
35 --replace_column 2 # 5 #
36 --replace_regex /\/\* xid=.* \*\//\/* XID *\// /file_id=[0-9]+/file_id=#/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/
37 --eval show binlog events in '$binlog_file' from $binlog_pos
38
39
40 --sync_slave_with_master
41
42 if (`SELECT sum(a) != 6 FROM t`)
43 {
44 --echo *** unexpected result; check slave applier ***
45 --die
46 }
47
48
49 # Cleanup
50
51 --connection master
52 SET debug_dbug=@old_debug_dbug;
53
54 DROP TABLE t;
55
56 --sync_slave_with_master
57
58 --source include/rpl_end.inc