1################################### 2# Author: JBM 3# Date: 2006-01-11 4# Purpose: Second test case from 5# rpl_EE_err.test split out 6# from orginal to make the 7# first work with both RBR and SBR 8################################### 9#REQUIREMENT: An INSERT with a faked duplicate entry error on 10#master should be replicated to slave and force the slave to stop 11#(since the slave can't cause a faked error to re-occur). 12################################### 13 14-- source include/master-slave.inc 15 16connection master; 17eval create table t1 (a int, unique(a)) engine=$engine_type; 18set sql_log_bin=0; 19insert into t1 values(2); 20set sql_log_bin=1; 21 22--error ER_DUP_ENTRY 23insert into t1 values(1),(2); 24drop table t1; 25 26connection slave; 27call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* Error_code: 0"); 28call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state"); 29 30--echo (expect different error codes on master and slave) 31# ER_MTS_INCONSISTENT_DATA 32--let $slave_sql_errno= 0,1756 33# can't print error text. MTS reports a separate error in this case. 34# Todo: to fix single-threaded-slave BUG#57287. 35--let $show_slave_sql_error= 0 36--source include/wait_for_slave_sql_error.inc 37drop table t1; 38--source include/stop_slave.inc 39# Clear error messages. 40RESET SLAVE; 41 42# End of 4.1 tests 43 44--let $rpl_only_running_threads= 1 45--source include/rpl_end.inc 46