mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 14:02:32 +01:00
4597814717
mysql-test/extra/rpl_tests/rpl_loaddata.test: Removing SHOW MASTER STATUS that does not seem to make sense. mysql-test/extra/rpl_tests/rpl_log.test: Correcting test case to sync slave with master. mysql-test/suite/binlog/r/binlog_unsafe.result: Result change. mysql-test/suite/binlog/t/binlog_unsafe.test: Removing unsafe variable from list of safe variables. mysql-test/suite/rpl/r/rpl_loaddata.result: Result change. mysql-test/suite/rpl/r/rpl_skip_error.result: Result change. mysql-test/suite/rpl/t/rpl_skip_error.test: Correcting bad manual+automatic merge. Test is now only relevant for statement- based replication. sql/rpl_rli.cc: Correcting automerge undoing previous change of return value. Relay_log_info::wait_for_pos() should return -2 when not initialized to work correctly.
82 lines
2.1 KiB
Text
82 lines
2.1 KiB
Text
# ==== Purpose ====
|
|
#
|
|
# Verify that --slave-skip-errors works correctly. The error messages
|
|
# specified by --slave-skip-errors on slave should be ignored. If
|
|
# such errors occur, they should not be reported and not cause the
|
|
# slave to stop.
|
|
#
|
|
# ==== Method ====
|
|
#
|
|
# We run the slave with --slave-skip-errors=1062 (the code for
|
|
# duplicate key). On slave, we insert value 1 in a table, and then,
|
|
# on master, we insert value 1 in the table. The error should be
|
|
# ignored on slave.
|
|
#
|
|
# ==== Related bugs ====
|
|
#
|
|
# BUG#28839: Errors in strict mode silently stop SQL thread if --slave-skip-errors exists
|
|
# bug in this test: BUG#30594: rpl.rpl_skip_error is nondeterministic
|
|
|
|
source include/master-slave.inc;
|
|
source include/have_binlog_format_statement.inc;
|
|
|
|
|
|
--echo ==== Test Without sql_mode=strict_trans_tables ====
|
|
|
|
--echo [on master]
|
|
create table t1 (n int not null primary key);
|
|
|
|
--echo [on slave]
|
|
sync_slave_with_master;
|
|
insert into t1 values (1);
|
|
|
|
--echo [on master]
|
|
connection master;
|
|
# Here we expect (ignored) error, since 1 is already in slave table
|
|
insert into t1 values (1);
|
|
# These should work fine
|
|
insert into t1 values (2),(3);
|
|
|
|
sync_slave_with_master;
|
|
--echo [on slave]
|
|
select * from t1 order by n;
|
|
|
|
--echo ==== Test With sql_mode=strict_trans_tables ====
|
|
insert into t1 values (7),(8);
|
|
--echo [on master]
|
|
connection master;
|
|
set sql_mode=strict_trans_tables;
|
|
insert into t1 values (7), (8), (9);
|
|
--echo [on slave]
|
|
sync_slave_with_master;
|
|
select * from t1 order by n;
|
|
source include/show_slave_status2.inc;
|
|
|
|
--echo ==== Clean Up ====
|
|
connection master;
|
|
drop table t1;
|
|
sync_slave_with_master;
|
|
# End of 4.1 tests
|
|
|
|
#
|
|
# #28839 Errors in strict mode silently stop SQL thread if --slave-skip-errors exists
|
|
#
|
|
connection master;
|
|
create table t1(a int primary key);
|
|
insert into t1 values (1),(2);
|
|
delete from t1 where @@server_id=1;
|
|
set sql_mode=strict_trans_tables;
|
|
insert into t1 values (7), (8), (9);
|
|
|
|
--echo [on slave]
|
|
sync_slave_with_master;
|
|
select * from t1;
|
|
source include/show_slave_status2.inc;
|
|
|
|
|
|
--echo ==== Clean Up ====
|
|
|
|
connection master;
|
|
drop table t1;
|
|
sync_slave_with_master;
|
|
# End of 5.0 tests
|