From dc0c5df5572caf42349122d9adc690e6595d0ba6 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Jan 2006 20:02:11 +0100 Subject: RBR test updates per lars request mysql-test/extra/rpl_tests/rpl_EE_err.test: Splitting tests case per Lars review mysql-test/t/rpl_EE_err.test: Splitting tests case per Lars review mysql-test/r/rpl_EE_err.result: Splitting tests case per Lars review mysql-test/t/rpl_stm_EE_err2.test: New test case file from splitting out the test cases from the orginal rpl_EE_error.test per lars mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test: New test case file from splitting out the test cases from the orginal rpl_EE_error.test per lars mysql-test/r/rpl_stm_EE_err2.result: New test case file from splitting out the test cases from the orginal rpl_EE_error.test per lars BitKeeper/deleted/.del-rpl_row_EE_err.test~b3d8db3eacbb7af5: Delete: mysql-test/extra/rpl_tests/rpl_row_EE_err.test BitKeeper/deleted/.del-rpl_row_EE_err.test~6cd033708a4535db: Delete: mysql-test/t/rpl_row_EE_err.test BitKeeper/deleted/.del-rpl_row_EE_err.result~5ad217703f686c4d: Delete: mysql-test/r/rpl_row_EE_err.result --- mysql-test/extra/rpl_tests/rpl_EE_err.test | 29 ++++++++++++++++++ mysql-test/extra/rpl_tests/rpl_row_EE_err.test | 40 ------------------------- mysql-test/extra/rpl_tests/rpl_stm_EE_err.test | 38 ----------------------- mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test | 30 +++++++++++++++++++ mysql-test/r/rpl_EE_err.result | 11 +++++++ mysql-test/r/rpl_row_EE_err.result | 19 ------------ mysql-test/r/rpl_stm_EE_err.result | 18 ----------- mysql-test/r/rpl_stm_EE_err2.result | 13 ++++++++ mysql-test/t/rpl_EE_err.test | 2 ++ mysql-test/t/rpl_row_EE_err.test | 2 -- mysql-test/t/rpl_stm_EE_err.test | 2 -- mysql-test/t/rpl_stm_EE_err2.test | 8 +++++ 12 files changed, 93 insertions(+), 119 deletions(-) create mode 100644 mysql-test/extra/rpl_tests/rpl_EE_err.test delete mode 100644 mysql-test/extra/rpl_tests/rpl_row_EE_err.test delete mode 100644 mysql-test/extra/rpl_tests/rpl_stm_EE_err.test create mode 100644 mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test create mode 100644 mysql-test/r/rpl_EE_err.result delete mode 100644 mysql-test/r/rpl_row_EE_err.result delete mode 100644 mysql-test/r/rpl_stm_EE_err.result create mode 100644 mysql-test/r/rpl_stm_EE_err2.result create mode 100644 mysql-test/t/rpl_EE_err.test delete mode 100644 mysql-test/t/rpl_row_EE_err.test delete mode 100644 mysql-test/t/rpl_stm_EE_err.test create mode 100644 mysql-test/t/rpl_stm_EE_err2.test diff --git a/mysql-test/extra/rpl_tests/rpl_EE_err.test b/mysql-test/extra/rpl_tests/rpl_EE_err.test new file mode 100644 index 00000000000..9c4621c7df4 --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_EE_err.test @@ -0,0 +1,29 @@ +# The test is not relevant when testing replication of error codes for +# statements that are not replicated. The test below could be changed +# to rely on the replication of error codes for statements that are not +# replicated row-based. +# +# See if an EE_ error in one event of the master's binlog stops replication +# (it should not: in this configuration the EE_ error is probably not +# critical). Example: you do a DROP TABLE on a table which has no MYI file +# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and +# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986). +#################################### +# Change Author: JBM +# Change Date: 2006-01-11 +# Change: Split test per lars review +#################################### +#"REQUIREMENT: A master DROP TABLE on a table with non-existing MYI +# file must be correctly replicated to the slave" +#################################### +-- source include/master-slave.inc + +eval create table t1 (a int) engine=$engine_type; +flush tables; +system rm ./var/master-data/test/t1.MYI ; +drop table if exists t1; +save_master_pos; +connection slave; +sync_with_master; + +# End of 4.1 tests diff --git a/mysql-test/extra/rpl_tests/rpl_row_EE_err.test b/mysql-test/extra/rpl_tests/rpl_row_EE_err.test deleted file mode 100644 index 7312e4e0fb5..00000000000 --- a/mysql-test/extra/rpl_tests/rpl_row_EE_err.test +++ /dev/null @@ -1,40 +0,0 @@ -# The test is not relevant when testing replication of error codes for -# statements that are not replicated. The test below could be changed -# to rely on the replication of error codes for statements that are not -# replicated row-based. - -# This test does not work the same for row based as the insert in the second part is not replicated as a call but rather as a table map and row right. Have added a slave stop so the test will complete, other wise it just continues to loop waiting for a slave stop that never comes. 8/22/2005 JBM - --- source include/have_binlog_format_row.inc - -# See if an EE_ error in one event of the master's binlog stops replication -# (it should not: in this configuration the EE_ error is probably not -# critical). Example: you do a DROP TABLE on a table which has no MYI file -# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and -# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986). - --- source include/master-slave.inc - -eval create table t1 (a int) engine=$engine_type; -flush tables; -system rm ./var/master-data/test/t1.MYI ; -drop table if exists t1; -save_master_pos; -connection slave; -sync_with_master; - -# Now a real error. - -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; -save_master_pos; ---error 1062 -insert into t1 values(1),(2); -drop table t1; -save_master_pos; -connection slave; -stop slave; -wait_for_slave_to_stop; diff --git a/mysql-test/extra/rpl_tests/rpl_stm_EE_err.test b/mysql-test/extra/rpl_tests/rpl_stm_EE_err.test deleted file mode 100644 index 9c7361093c3..00000000000 --- a/mysql-test/extra/rpl_tests/rpl_stm_EE_err.test +++ /dev/null @@ -1,38 +0,0 @@ -# The test is not relevant when testing replication of error codes for -# statements that are not replicated. The test below could be changed -# to rely on the replication of error codes for statements that are not -# replicated row-based. --- source include/have_binlog_format_statement.inc - -# See if an EE_ error in one event of the master's binlog stops replication -# (it should not: in this configuration the EE_ error is probably not -# critical). Example: you do a DROP TABLE on a table which has no MYI file -# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and -# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986). - --- source include/master-slave.inc - -eval create table t1 (a int) engine=$engine_type; -flush tables; -system rm ./var/master-data/test/t1.MYI ; -drop table if exists t1; -save_master_pos; -connection slave; -sync_with_master; - -# Now a real error. - -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; -save_master_pos; ---error 1062 -insert into t1 values(1),(2); -drop table t1; -save_master_pos; -connection slave; -wait_for_slave_to_stop; - -# End of 4.1 tests diff --git a/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test b/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test new file mode 100644 index 00000000000..6abd2ae844e --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test @@ -0,0 +1,30 @@ +################################### +# 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; +save_master_pos; +--error 1062 +insert into t1 values(1),(2); +drop table t1; +save_master_pos; +connection slave; +wait_for_slave_to_stop; + +# End of 4.1 tests + diff --git a/mysql-test/r/rpl_EE_err.result b/mysql-test/r/rpl_EE_err.result new file mode 100644 index 00000000000..16fa931e303 --- /dev/null +++ b/mysql-test/r/rpl_EE_err.result @@ -0,0 +1,11 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int) engine=myisam; +flush tables; +drop table if exists t1; +Warnings: +Error 2 Can't find file: 't1' (errno: 2) diff --git a/mysql-test/r/rpl_row_EE_err.result b/mysql-test/r/rpl_row_EE_err.result deleted file mode 100644 index 23b0c88f49d..00000000000 --- a/mysql-test/r/rpl_row_EE_err.result +++ /dev/null @@ -1,19 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t1 (a int) engine=myisam; -flush tables; -drop table if exists t1; -Warnings: -Error 2 Can't find file: 't1' (errno: 2) -create table t1 (a int, unique(a)) engine=myisam; -set sql_log_bin=0; -insert into t1 values(2); -set sql_log_bin=1; -insert into t1 values(1),(2); -ERROR 23000: Duplicate entry '2' for key 1 -drop table t1; -stop slave; diff --git a/mysql-test/r/rpl_stm_EE_err.result b/mysql-test/r/rpl_stm_EE_err.result deleted file mode 100644 index f4765b4b13c..00000000000 --- a/mysql-test/r/rpl_stm_EE_err.result +++ /dev/null @@ -1,18 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t1 (a int) engine=myisam; -flush tables; -drop table if exists t1; -Warnings: -Error 2 Can't find file: 't1' (errno: 2) -create table t1 (a int, unique(a)) engine=myisam; -set sql_log_bin=0; -insert into t1 values(2); -set sql_log_bin=1; -insert into t1 values(1),(2); -ERROR 23000: Duplicate entry '2' for key 1 -drop table t1; diff --git a/mysql-test/r/rpl_stm_EE_err2.result b/mysql-test/r/rpl_stm_EE_err2.result new file mode 100644 index 00000000000..fa1ce0ae0e6 --- /dev/null +++ b/mysql-test/r/rpl_stm_EE_err2.result @@ -0,0 +1,13 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int, unique(a)) engine=myisam; +set sql_log_bin=0; +insert into t1 values(2); +set sql_log_bin=1; +insert into t1 values(1),(2); +ERROR 23000: Duplicate entry '2' for key 1 +drop table t1; diff --git a/mysql-test/t/rpl_EE_err.test b/mysql-test/t/rpl_EE_err.test new file mode 100644 index 00000000000..28c5af0a192 --- /dev/null +++ b/mysql-test/t/rpl_EE_err.test @@ -0,0 +1,2 @@ +let $engine_type=myisam; +-- source extra/rpl_tests/rpl_EE_err.test diff --git a/mysql-test/t/rpl_row_EE_err.test b/mysql-test/t/rpl_row_EE_err.test deleted file mode 100644 index 7895a66adfd..00000000000 --- a/mysql-test/t/rpl_row_EE_err.test +++ /dev/null @@ -1,2 +0,0 @@ -let $engine_type=myisam; --- source extra/rpl_tests/rpl_row_EE_err.test diff --git a/mysql-test/t/rpl_stm_EE_err.test b/mysql-test/t/rpl_stm_EE_err.test deleted file mode 100644 index e883a6ce616..00000000000 --- a/mysql-test/t/rpl_stm_EE_err.test +++ /dev/null @@ -1,2 +0,0 @@ -let $engine_type=myisam; --- source extra/rpl_tests/rpl_stm_EE_err.test diff --git a/mysql-test/t/rpl_stm_EE_err2.test b/mysql-test/t/rpl_stm_EE_err2.test new file mode 100644 index 00000000000..dbcc66686ec --- /dev/null +++ b/mysql-test/t/rpl_stm_EE_err2.test @@ -0,0 +1,8 @@ +############################# +# Author: JBM +# Date: 2006-01-11 +# Purpose: Engine Wrapper for rpl_stm_EE_err2.test +############################## +-- source include/have_binlog_format_statement.inc +let $engine_type=myisam; +-- source extra/rpl_tests/rpl_stm_EE_err2.test -- cgit v1.2.1