From 54e07cea2e7ffb47c94bb29c4122b3d82d2a0a52 Mon Sep 17 00:00:00 2001 From: "jmiller@mysql.com" <> Date: Tue, 7 Feb 2006 14:51:46 +0100 Subject: [PATCH] More rpl test updates with using ndb as default engine --- mysql-test/r/rpl_drop_temp.result | 4 ++-- mysql-test/r/rpl_err_ignoredtable.result | 6 +++--- mysql-test/r/rpl_load_table_from_master.result | 2 ++ mysql-test/t/disabled.def | 2 +- mysql-test/t/rpl_drop_temp.test | 11 +++++++++-- mysql-test/t/rpl_err_ignoredtable.test | 10 ++++++---- mysql-test/t/rpl_foreign_key_innodb-slave.opt | 1 + mysql-test/t/rpl_load_table_from_master.test | 11 ++++++++--- 8 files changed, 32 insertions(+), 15 deletions(-) create mode 100644 mysql-test/t/rpl_foreign_key_innodb-slave.opt diff --git a/mysql-test/r/rpl_drop_temp.result b/mysql-test/r/rpl_drop_temp.result index 04fe094ea26..40d578dd13e 100644 --- a/mysql-test/r/rpl_drop_temp.result +++ b/mysql-test/r/rpl_drop_temp.result @@ -5,8 +5,8 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; create database if not exists mysqltest; -create temporary table mysqltest.t1 (n int); -create temporary table mysqltest.t2 (n int); +create temporary table mysqltest.t1 (n int)ENGINE=MyISAM; +create temporary table mysqltest.t2 (n int)ENGINE=MyISAM; show status like 'Slave_open_temp_tables'; Variable_name Value Slave_open_temp_tables 0 diff --git a/mysql-test/r/rpl_err_ignoredtable.result b/mysql-test/r/rpl_err_ignoredtable.result index 84072be7d44..27db9c0372c 100644 --- a/mysql-test/r/rpl_err_ignoredtable.result +++ b/mysql-test/r/rpl_err_ignoredtable.result @@ -7,14 +7,14 @@ start slave; create table t1 (a int primary key); create table t4 (a int primary key); insert into t1 values (1),(1); -ERROR 23000: Duplicate entry '1' for key 1 +Got one of the listed errors insert into t4 values (1),(2); show tables like 't1'; Tables_in_test (t1) show tables like 't4'; Tables_in_test (t4) t4 -SELECT * FROM test.t4; +SELECT * FROM test.t4 ORDER BY a; a 1 2 @@ -33,7 +33,7 @@ select (@id := id) - id from t3; kill @id; drop table t2,t3; insert into t4 values (3),(4); -SELECT * FROM test.t4; +SELECT * FROM test.t4 ORDER BY a; a 1 2 diff --git a/mysql-test/r/rpl_load_table_from_master.result b/mysql-test/r/rpl_load_table_from_master.result index 308e54557fb..9d9a1d7d6cb 100644 --- a/mysql-test/r/rpl_load_table_from_master.result +++ b/mysql-test/r/rpl_load_table_from_master.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +"******************** Test Requirment 1 *************" SET SQL_LOG_BIN=0,timestamp=200006; CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM; INSERT INTO t1 ( a) VALUE ('F'); @@ -17,6 +18,7 @@ unix_timestamp(t) set SQL_LOG_BIN=1,timestamp=default; drop table t1; set SQL_LOG_BIN=0; +"******************** Test Requirment 2 *************" CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1; INSERT INTO t1 VALUES (1); load table t1 from master; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 4ffce33766a..5010e8afb81 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -30,6 +30,6 @@ ndb_autodiscover2 : Needs to be fixed w.r.t binlog #ndb_alter_table_row : sometimes wrong error 1015!=1046 ndb_gis : garbled msgs from corrupt THD* rpl_ndb_auto_inc : MySQL Bugs:17086 -rpl_ndb_relay_space : Results are not deterministic +rpl_ndb_relay_space : Bug 16993 ndb_binlog_ddl_multi : Bug #17038 rpl_ndb_log : MySQL Bugs: #17158 diff --git a/mysql-test/t/rpl_drop_temp.test b/mysql-test/t/rpl_drop_temp.test index 55a4e741d7c..53261e91b7b 100644 --- a/mysql-test/t/rpl_drop_temp.test +++ b/mysql-test/t/rpl_drop_temp.test @@ -1,10 +1,17 @@ +############################################## +# Change Author: JBM +# Change Date: 2006-02-07 +# Change: Added ENGINE=MyISAM +# Purpose: According to TU in 16552 This is how +# to work around NDB's issue with temp tables +############################################## source include/master-slave.inc; --disable_warnings create database if not exists mysqltest; --enable_warnings -create temporary table mysqltest.t1 (n int); -create temporary table mysqltest.t2 (n int); +create temporary table mysqltest.t1 (n int)ENGINE=MyISAM; +create temporary table mysqltest.t2 (n int)ENGINE=MyISAM; sync_slave_with_master; connection master; disconnect master; diff --git a/mysql-test/t/rpl_err_ignoredtable.test b/mysql-test/t/rpl_err_ignoredtable.test index 81aa76225be..42ca8cf2e8b 100644 --- a/mysql-test/t/rpl_err_ignoredtable.test +++ b/mysql-test/t/rpl_err_ignoredtable.test @@ -1,15 +1,17 @@ # Test for # Bug #797: If a query is ignored on slave (replicate-ignore-table) the slave # still checks that it has the same error as on the master. +########################################################################## +# 2006-02-07 JBM Added error code 1022 for NDB Engine + ORDER BY +########################################################################## -# Requires statement logging -- source include/master-slave.inc connection master; create table t1 (a int primary key); create table t4 (a int primary key); # generate an error that goes to the binlog ---error 1062 +--error 1022, 1062 insert into t1 values (1),(1); insert into t4 values (1),(2); save_master_pos; @@ -19,7 +21,7 @@ sync_with_master; # check that the table has been ignored, because otherwise the test is nonsense show tables like 't1'; show tables like 't4'; -SELECT * FROM test.t4; +SELECT * FROM test.t4 ORDER BY a; connection master; drop table t1; save_master_pos; @@ -53,7 +55,7 @@ connection master1; save_master_pos; connection slave; sync_with_master; -SELECT * FROM test.t4; +SELECT * FROM test.t4 ORDER BY a; connection master1; DROP TABLE test.t4; diff --git a/mysql-test/t/rpl_foreign_key_innodb-slave.opt b/mysql-test/t/rpl_foreign_key_innodb-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/t/rpl_foreign_key_innodb-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/t/rpl_load_table_from_master.test b/mysql-test/t/rpl_load_table_from_master.test index c1397a175d9..aad113878d3 100644 --- a/mysql-test/t/rpl_load_table_from_master.test +++ b/mysql-test/t/rpl_load_table_from_master.test @@ -15,15 +15,14 @@ ############################################################ # REQUIREMENT TEST 1: # LOAD TABLE FROM MASTER must work with a forced timestamp. -# -# REQUIREMENTi TEST 2: -#LOAD TABLE FROM MASTER must work with table checksum ############################################################ # # Test forced timestamp # -- source include/master-slave.inc +-- echo "******************** Test Requirment 1 *************" + # Don't log table creating to the slave as we want to test LOAD TABLE SET SQL_LOG_BIN=0,timestamp=200006; eval CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM; @@ -49,6 +48,12 @@ connection master; # Don't log table creating to the slave as we want to test LOAD TABLE set SQL_LOG_BIN=0; +####################################################### +# REQUIREMENTi TEST 2: +#LOAD TABLE FROM MASTER must work with table checksum +####################################################### +-- echo "******************** Test Requirment 2 *************" + eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1; INSERT INTO t1 VALUES (1); save_master_pos;