mariadb/mysql-test/suite/rpl/t/rpl_skip_error.test
unknown ba7570b110 Bug #30594 rpl.rpl_skip_error is nondeterministic
Non-determinism in the tests was due to results of SBR are different from those gained
with row binlog format.

Because tests effectively verify skipping only ER_DUP_ENTRY it is explicitly required
to run the test on in mixed and stmt binlog format.
ER_DUP_ENTRY is automatically ignored when happened in RBR because of implicit rule
favoring reentrant reading from binlog rule
which means that a Write_rows_log_event overwrites a slave's row
if the one has the same primary key.

If future we might have skipping error due to applying of row-based events.
The comments added saying a new file would be needed for that: rpl_row_skip_error or smth.


mysql-test/suite/rpl/r/rpl_skip_error.result:
  new results
mysql-test/suite/rpl/t/rpl_skip_error-slave.opt:
  wrong error code that can not happen in the test removed.
mysql-test/suite/rpl/t/rpl_skip_error.test:
  enforcing the test is to skip only errors due to SBR.
  The current test does not check anything for RBR as ignorable ER_DUP_ENTRY
  does make sense only for SBR.
2007-10-22 21:45:21 +03:00

59 lines
1.4 KiB
Text

##########################################
# 2006-02-07 By JBM: Added order by
#########################################
# Note that errors are ignored by opt file.
source include/master-slave.inc;
source include/have_binlog_format_mixed_or_statement.inc;
#
# Bug #30594
# Skipping error due to applying Row-based repliation events
# should be checked with another test file
# consider names like rpl_row_skip_error
#
create table t1 (n int not null primary key);
save_master_pos;
connection slave;
sync_with_master;
insert into t1 values (1);
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);
save_master_pos;
connection slave;
sync_with_master;
select * from t1 ORDER BY n;
# Cleanup
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;
select @@server_id;
insert into t1 values (1),(2),(3);
sync_slave_with_master;
connection slave;
select @@server_id;
select * from t1;
--replace_column 1 # 8 # 9 # 23 # 33 #
--replace_result $MASTER_MYPORT MASTER_PORT
show slave status;
connection master;
drop table t1;
sync_with_master;
# End of 5.0 tests