Debian Codegraph @

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

raw
1 --source include/have_partition.inc
2 --source include/have_binlog_format_mixed.inc
3 --source include/master-slave.inc
4
5 create table t (a int, key(a)) partition by range (a) (
6 partition p0 values less than (10),
7 partition p1 values less than (100)
8 );
9
10 insert into t values (5),(50);
11
12 --sync_slave_with_master
13 # Simulate rows ending up in wrong partitions, to make REPAIR have
14 # something to do.
15 # The bug was that the repair was reported as ERROR in the error log on the
16 # slave (it should be WARNING like in the interactive session on the master).
17 flush tables;
18 --let $datadir= `select @@datadir`
19 --move_file $datadir/test/t#P#p0.MYD $datadir/test/tmp
20 --move_file $datadir/test/t#P#p1.MYD $datadir/test/t#P#p0.MYD
21 --move_file $datadir/test/tmp $datadir/test/t#P#p1.MYD
22
23 --connection master
24 repair table t;
25 --sync_slave_with_master
26 SET STATEMENT sql_log_bin=0 FOR
27 CALL mtr.add_suppression('[[]Warning[]] Moved 1 misplaced rows');
28
29 --connection master
30 DROP TABLE t;
31 --source include/rpl_end.inc