mirror of
https://github.com/MariaDB/server.git
synced 2025-01-25 00:04:33 +01:00
eb75edfb2b
This makes it clear that the error code has nothing to do with errno. mysql-test/include/mtr_warnings.sql: Fixed suppression for new slave error messages mysql-test/lib/My/Test.pm: Use 'send' instead of 'print' to avoid errors about "wrong class ... back attempt" mysql-test/lib/v1/mtr_report.pl: Fixed suppression for new slave error messages mysql-test/mysql-test-run.pl: Fixed suppression for new slave error messages Removed warning from perl 5.16.2 about arrays mysql-test/r/flush_read_lock.result: Fixed suppression for new slave error messages sql/rpl_reporting.cc: Instead of writing "Errcode" to the log for Slave errors, use "Internal MariaDB error code"
41 lines
1.3 KiB
Text
41 lines
1.3 KiB
Text
###################################
|
|
# Author: JBM
|
|
# Date: 2006-01-11
|
|
# Purpose: Second test case from
|
|
# rpl_EE_err.test split out
|
|
# from orginal to make the
|
|
# first work with both RBR and SBR
|
|
###################################
|
|
#REQUIREMENT: An INSERT with a faked duplicate entry error on
|
|
#master should be replicated to slave and force the slave to stop
|
|
#(since the slave can't cause a faked error to re-occur).
|
|
###################################
|
|
|
|
-- source include/master-slave.inc
|
|
|
|
connection master;
|
|
eval create table t1 (a int, unique(a)) engine=$engine_type;
|
|
set sql_log_bin=0;
|
|
insert into t1 values(2);
|
|
set sql_log_bin=1;
|
|
|
|
--error ER_DUP_ENTRY
|
|
insert into t1 values(1),(2);
|
|
drop table t1;
|
|
|
|
connection slave;
|
|
--source include/wait_for_slave_sql_to_stop.inc
|
|
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* error.* 0");
|
|
let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
|
|
let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
|
--echo Error: "$error" (expected different error codes on master and slave)
|
|
--echo Errno: "$errno" (expected 0)
|
|
drop table t1;
|
|
--source include/stop_slave.inc
|
|
# Clear error messages.
|
|
RESET SLAVE;
|
|
|
|
# End of 4.1 tests
|
|
|
|
--let $rpl_only_running_threads= 1
|
|
--source include/rpl_end.inc
|