From 9c5dbcc8e23390b609114fc2054fb1b47c2f4c7d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Feb 2006 01:59:02 +0100 Subject: [PATCH 1/3] First set of rpl test updated for NDB and general test cleanup mysql-test/t/rpl000004.test: Updated test so it would not fail when MyISAM was not default Engine mysql-test/r/rpl000004.result: Updated test so it would not fail when MyISAM was not default Engine mysql-test/extra/rpl_tests/rpl000006.test: Updated test so that it would not fail when other engines are set as default engine mysql-test/r/rpl000006.result: Updated test so that it would not fail when other engines are set as default engine mysql-test/r/rpl_relay_space_myisam.result: Rename: mysql-test/r/rpl000005.result -> mysql-test/r/rpl_relay_space_myisam.result mysql-test/extra/rpl_tests/rpl_sv_relay_space.test: Had to split the test cases out to use for each engine. Reason being that the data goes applies to ndb in different order. So it has to have its own result file and I want to ensure that it is not used for other tests when ndb is used as default engine. Old test case was called rpl000009.test, so it was renamed as well to give the test more meaning mysql-test/t/rpl_relay_space_innodb-master.opt: Wrapper for old test case called rpl000009.test mysql-test/t/rpl_relay_space_innodb-slave.opt: Wrapper for old test case called rpl000009.test mysql-test/t/rpl_relay_space_innodb.test: Wrapper for old test case called rpl000009.test mysql-test/t/rpl_relay_space_myisam.test: Wrapper for old test case called rpl000009.test mysql-test/t/rpl_ndb_relay_space.test: Wrapper for old test case called rpl000009.test mysql-test/r/rpl_ndb_relay_space.result: Result file for wrapper for old test case called rpl000009.test mysql-test/r/rpl_relay_space_innodb.result: Result file for wrapper for old test case called rpl000009.test mysql-test/r/rpl_relay_space_ndb.result: Result file for wrapper for old test case called rpl000009.test mysql-test/t/rpl000009.test: updated to work when ndb is default engine mysql-test/r/rpl000009.result: updated to work when ndb is default engine mysql-test/t/rpl_LD_INFILE.test: Plan test cleanup mysql-test/r/rpl_LD_INFILE.result: Plan test cleanup mysql-test/t/rpl_auto_increment-slave.opt: needed to ensure test does not fail if default engine is specified mysql-test/extra/rpl_tests/rpl_auto_increment.test: Sorry, forgot to cleanup from debugging mysql-test/t/rpl_ndb_auto_inc.test: New wrapper for NDB mysql-test/t/rpl_ndb_auto_inc-master.opt: New wrapper for NDB mysql-test/r/rpl_ndb_auto_inc.result: New wrapper for NDB mysql-test/t/disabled.def: Updated --- mysql-test/extra/rpl_tests/rpl000006.test | 10 +- .../rpl_tests/rpl_sv_relay_space.test} | 6 +- mysql-test/r/rpl000004.result | 6 +- mysql-test/r/rpl000006.result | 2 +- mysql-test/r/rpl000009.result | 8 +- mysql-test/r/rpl_LD_INFILE.result | 204 +++++++++--------- mysql-test/r/rpl_ndb_auto_inc.result | 185 ++++++++++++++++ mysql-test/r/rpl_ndb_relay_space.result | 25 +++ mysql-test/r/rpl_relay_space_innodb.result | 25 +++ ...5.result => rpl_relay_space_myisam.result} | 0 mysql-test/r/rpl_relay_space_ndb.result | 25 +++ mysql-test/t/disabled.def | 2 +- mysql-test/t/rpl000004.test | 14 +- mysql-test/t/rpl000009.test | 17 +- mysql-test/t/rpl_LD_INFILE.test | 8 +- mysql-test/t/rpl_auto_increment-slave.opt | 1 + mysql-test/t/rpl_ndb_auto_inc-master.opt | 1 + mysql-test/t/rpl_ndb_auto_inc.test | 7 + mysql-test/t/rpl_ndb_relay_space.test | 7 + .../t/rpl_relay_space_innodb-master.opt | 1 + mysql-test/t/rpl_relay_space_innodb-slave.opt | 1 + mysql-test/t/rpl_relay_space_innodb.test | 7 + mysql-test/t/rpl_relay_space_myisam.test | 6 + 23 files changed, 440 insertions(+), 128 deletions(-) rename mysql-test/{t/rpl000005.test => extra/rpl_tests/rpl_sv_relay_space.test} (76%) create mode 100644 mysql-test/r/rpl_ndb_auto_inc.result create mode 100644 mysql-test/r/rpl_ndb_relay_space.result create mode 100644 mysql-test/r/rpl_relay_space_innodb.result rename mysql-test/r/{rpl000005.result => rpl_relay_space_myisam.result} (100%) create mode 100644 mysql-test/r/rpl_relay_space_ndb.result create mode 100644 mysql-test/t/rpl_auto_increment-slave.opt create mode 100644 mysql-test/t/rpl_ndb_auto_inc-master.opt create mode 100644 mysql-test/t/rpl_ndb_auto_inc.test create mode 100644 mysql-test/t/rpl_ndb_relay_space.test create mode 100644 mysql-test/t/rpl_relay_space_innodb-master.opt create mode 100644 mysql-test/t/rpl_relay_space_innodb-slave.opt create mode 100644 mysql-test/t/rpl_relay_space_innodb.test create mode 100644 mysql-test/t/rpl_relay_space_myisam.test diff --git a/mysql-test/extra/rpl_tests/rpl000006.test b/mysql-test/extra/rpl_tests/rpl000006.test index 272e5744d9c..e4fbe841346 100644 --- a/mysql-test/extra/rpl_tests/rpl000006.test +++ b/mysql-test/extra/rpl_tests/rpl000006.test @@ -1,3 +1,11 @@ +########################################################### +# Change Author: JBM +# Change Date: 2006-2-2 +# Change: Added ENGINE=$engine_type for first create table +# Reason: Only MyISAM supports load from master no need to +# run test case for other engines, in addition test will +# fail if other engines are set as default engine +########################################################### # # Test forced timestamp # @@ -5,7 +13,7 @@ # Don't log table creating to the slave as we want to test LOAD TABLE set SQL_LOG_BIN=0,timestamp=200006; -create table t1(t timestamp not null,a char(1)); +eval create table t1(t timestamp not null,a char(1))ENGINE=$engine_type; insert into t1 ( a) values ('F'); select unix_timestamp(t) from t1; connection slave; diff --git a/mysql-test/t/rpl000005.test b/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test similarity index 76% rename from mysql-test/t/rpl000005.test rename to mysql-test/extra/rpl_tests/rpl_sv_relay_space.test index 0a2b7f9458a..57b74c80b58 100644 --- a/mysql-test/t/rpl000005.test +++ b/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test @@ -3,6 +3,10 @@ # Change Date: 2006-01-17 # Change: Added order by in select #################### +# Change Date: 2006-02-02 +# Change: renamed to make bettre sense, +# and wrapped per Engine test +############################ source include/master-slave.inc; # @@ -10,7 +14,7 @@ source include/master-slave.inc; # SHOW VARIABLES LIKE 'relay_log_space_limit'; -CREATE TABLE t1 (name varchar(64), age smallint(3)); +eval CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=$engine_type; INSERT INTO t1 SET name='Andy', age=31; INSERT t1 SET name='Jacob', age=2; INSERT into t1 SET name='Caleb', age=1; diff --git a/mysql-test/r/rpl000004.result b/mysql-test/r/rpl000004.result index 9abb4db7974..42e43546ffb 100644 --- a/mysql-test/r/rpl000004.result +++ b/mysql-test/r/rpl000004.result @@ -5,11 +5,11 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; set SQL_LOG_BIN=0; -create table t1 (word char(20) not null, index(word)); +create table t1 (word char(20) not null, index(word))ENGINE=MyISAM; load data infile '../../std_data/words.dat' into table t1; -create table t2 (word char(20) not null); +create table t2 (word char(20) not null)ENGINE=MyISAM; load data infile '../../std_data/words.dat' into table t2; -create table t3 (word char(20) not null primary key); +create table t3 (word char(20) not null primary key)ENGINE=MyISAM; load table t1 from master; load table t2 from master; load table t3 from master; diff --git a/mysql-test/r/rpl000006.result b/mysql-test/r/rpl000006.result index e4c2006c2f0..bb8d57a30cf 100644 --- a/mysql-test/r/rpl000006.result +++ b/mysql-test/r/rpl000006.result @@ -5,7 +5,7 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; set SQL_LOG_BIN=0,timestamp=200006; -create table t1(t timestamp not null,a char(1)); +create table t1(t timestamp not null,a char(1))ENGINE=MyISAM; insert into t1 ( a) values ('F'); select unix_timestamp(t) from t1; unix_timestamp(t) diff --git a/mysql-test/r/rpl000009.result b/mysql-test/r/rpl000009.result index 9a3a2e7af3f..27569a087da 100644 --- a/mysql-test/r/rpl000009.result +++ b/mysql-test/r/rpl000009.result @@ -38,12 +38,12 @@ mysql mysqltest mysqltest2 test -create table mysqltest2.t1(n int, s char(20)); -create table mysqltest2.t2(n int, s text); +create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; +create table mysqltest2.t2(n int, s text)ENGINE=MyISAM; insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three'); insert into mysqltest2.t2 values (11, 'eleven'), (12, 'twelve'), (13, 'thirteen'); -create table mysqltest.t1(n int, s char(20)); -create table mysqltest.t2(n int, s text); +create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; +create table mysqltest.t2(n int, s text)ENGINE=MyISAM; insert into mysqltest.t1 values (1, 'one test'), (2, 'two test'), (3, 'three test'); insert into mysqltest.t2 values (11, 'eleven test'), (12, 'twelve test'), (13, 'thirteen test'); diff --git a/mysql-test/r/rpl_LD_INFILE.result b/mysql-test/r/rpl_LD_INFILE.result index a2e4ef7b83b..b092dd9e088 100644 --- a/mysql-test/r/rpl_LD_INFILE.result +++ b/mysql-test/r/rpl_LD_INFILE.result @@ -4,118 +4,114 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a)); LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1; DELETE FROM test.t1 WHERE a = 'abashed'; DELETE FROM test.t1; LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1; -SELECT * FROM test.t1; +SELECT * FROM test.t1 ORDER BY a DESC; a -abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant aberration -SELECT * FROM test.t1; +aberrant +Abernathy +Aberdeen +Abelson +Abelian +Abel +abed +Abe +abducts +abductors +abductor +abductions +abduction +abducted +abduct +abdominal +abdomens +abdomen +Abby +abbreviations +abbreviation +abbreviating +abbreviates +abbreviated +abbreviate +Abbott +abbots +abbot +abbeys +abbey +abbe +Abba +abating +abates +abater +abatements +abatement +abated +abate +abasing +abashing +abashes +abashed +abash +abases +abasements +abasement +abased +abase +SELECT * FROM test.t1 ORDER BY a DESC; a -abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant aberration -DROP PROCEDURE IF EXISTS test.p1; -Warnings: -Note 1305 PROCEDURE p1 does not exist +aberrant +Abernathy +Aberdeen +Abelson +Abelian +Abel +abed +Abe +abducts +abductors +abductor +abductions +abduction +abducted +abduct +abdominal +abdomens +abdomen +Abby +abbreviations +abbreviation +abbreviating +abbreviates +abbreviated +abbreviate +Abbott +abbots +abbot +abbeys +abbey +abbe +Abba +abating +abates +abater +abatements +abatement +abated +abate +abasing +abashing +abashes +abashed +abash +abases +abasements +abasement +abased +abase DROP TABLE test.t1; diff --git a/mysql-test/r/rpl_ndb_auto_inc.result b/mysql-test/r/rpl_ndb_auto_inc.result new file mode 100644 index 00000000000..9eca51ad2d9 --- /dev/null +++ b/mysql-test/r/rpl_ndb_auto_inc.result @@ -0,0 +1,185 @@ +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 not null auto_increment,b int, primary key (a)) engine=myisam auto_increment=3; +insert into t1 values (NULL,1),(NULL,2),(NULL,3); +select * from t1; +a b +12 1 +22 2 +32 3 +select * from t1; +a b +12 1 +22 2 +32 3 +drop table t1; +create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam; +insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); +delete from t1 where b=4; +insert into t1 values (NULL,5),(NULL,6); +select * from t1; +a b +1 1 +2 2 +3 3 +22 5 +32 6 +select * from t1; +a b +1 1 +2 2 +3 3 +22 5 +32 6 +drop table t1; +set @@session.auto_increment_increment=100, @@session.auto_increment_offset=10; +show variables like "%auto_inc%"; +Variable_name Value +auto_increment_increment 100 +auto_increment_offset 10 +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +insert into t1 values (NULL),(5),(NULL); +insert into t1 values (250),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +insert into t1 values (1000); +set @@insert_id=400; +insert into t1 values(NULL),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +drop table t1; +create table t1 (a int not null auto_increment, primary key (a)) engine=innodb; +insert into t1 values (NULL),(5),(NULL); +insert into t1 values (250),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +insert into t1 values (1000); +set @@insert_id=400; +insert into t1 values(NULL),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +drop table t1; +set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +insert into t1 values (NULL),(5),(NULL),(NULL); +insert into t1 values (500),(NULL),(502),(NULL),(NULL); +select * from t1; +a +1 +5 +6 +7 +500 +501 +502 +503 +504 +set @@insert_id=600; +insert into t1 values(600),(NULL),(NULL); +ERROR 23000: Duplicate entry '600' for key 1 +set @@insert_id=600; +insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); +select * from t1; +a +1 +5 +6 +7 +500 +501 +502 +503 +504 +600 +610 +611 +select * from t1; +a +1 +5 +6 +7 +500 +501 +502 +503 +504 +600 +610 +611 +drop table t1; +set @@session.auto_increment_increment=10, @@session.auto_increment_offset=1; +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +insert into t1 values(2),(12),(22),(32),(42); +insert into t1 values (NULL),(NULL); +insert into t1 values (3),(NULL),(NULL); +select * from t1; +a +1 +3 +11 +21 +31 +select * from t1; +a +1 +2 +3 +11 +12 +21 +22 +31 +32 +42 +drop table t1; diff --git a/mysql-test/r/rpl_ndb_relay_space.result b/mysql-test/r/rpl_ndb_relay_space.result new file mode 100644 index 00000000000..1e25b7fe8c1 --- /dev/null +++ b/mysql-test/r/rpl_ndb_relay_space.result @@ -0,0 +1,25 @@ +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; +SHOW VARIABLES LIKE 'relay_log_space_limit'; +Variable_name Value +relay_log_space_limit 0 +CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=NDB; +INSERT INTO t1 SET name='Andy', age=31; +INSERT t1 SET name='Jacob', age=2; +INSERT into t1 SET name='Caleb', age=1; +ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY; +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Caleb 1 00000002 +Jacob 2 00000003 +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Caleb 1 00000002 +Jacob 2 00000003 +drop table t1; diff --git a/mysql-test/r/rpl_relay_space_innodb.result b/mysql-test/r/rpl_relay_space_innodb.result new file mode 100644 index 00000000000..80d8c48c241 --- /dev/null +++ b/mysql-test/r/rpl_relay_space_innodb.result @@ -0,0 +1,25 @@ +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; +SHOW VARIABLES LIKE 'relay_log_space_limit'; +Variable_name Value +relay_log_space_limit 0 +CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=InnoDB; +INSERT INTO t1 SET name='Andy', age=31; +INSERT t1 SET name='Jacob', age=2; +INSERT into t1 SET name='Caleb', age=1; +ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY; +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Jacob 2 00000002 +Caleb 1 00000003 +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Jacob 2 00000002 +Caleb 1 00000003 +drop table t1; diff --git a/mysql-test/r/rpl000005.result b/mysql-test/r/rpl_relay_space_myisam.result similarity index 100% rename from mysql-test/r/rpl000005.result rename to mysql-test/r/rpl_relay_space_myisam.result diff --git a/mysql-test/r/rpl_relay_space_ndb.result b/mysql-test/r/rpl_relay_space_ndb.result new file mode 100644 index 00000000000..02bff7ae881 --- /dev/null +++ b/mysql-test/r/rpl_relay_space_ndb.result @@ -0,0 +1,25 @@ +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; +SHOW VARIABLES LIKE 'relay_log_space_limit'; +Variable_name Value +relay_log_space_limit 0 +CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=MyISAM; +INSERT INTO t1 SET name='Andy', age=31; +INSERT t1 SET name='Jacob', age=2; +INSERT into t1 SET name='Caleb', age=1; +ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY; +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Jacob 2 00000002 +Caleb 1 00000003 +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Jacob 2 00000002 +Caleb 1 00000003 +drop table t1; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index b66fa869eb0..11658892c54 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -25,7 +25,6 @@ partition_03ndb : Bug#16385 ndb_binlog_basic : Results are not deterministic, Tomas will fix rpl_ndb_basic : Bug#16228 rpl_sp : Bug #16456 -#ndb_dd_disk2memory : Bug #16466 ndb_autodiscover : Needs to be fixed w.r.t binlog ndb_autodiscover2 : Needs to be fixed w.r.t binlog ndb_blob : BLOB replication causes core in master1 (Pekka will fix) @@ -33,5 +32,6 @@ system_mysql_db : Needs fixing system_mysql_db_fix : Needs fixing #ndb_alter_table_row : sometimes wrong error 1015!=1046 ndb_gis : garbled msgs from corrupt THD* +rpl_ndb_auto_inc.test : MySQL Bugs:17086 # vim: set filetype=conf: diff --git a/mysql-test/t/rpl000004.test b/mysql-test/t/rpl000004.test index f2a02bd4dd6..993b804d469 100644 --- a/mysql-test/t/rpl000004.test +++ b/mysql-test/t/rpl000004.test @@ -1,11 +1,19 @@ +###################################### +# Change Author: JBM +# Change Date: 2006-02-02 +# Change: Added ENGINE=MyISAM +# Reason: LOAD FROM MASTER is only supported from +# MyISAM, therefore there is no reason for this test +# To use anyother Engine +###################################### source include/master-slave.inc; set SQL_LOG_BIN=0; -create table t1 (word char(20) not null, index(word)); +create table t1 (word char(20) not null, index(word))ENGINE=MyISAM; load data infile '../../std_data/words.dat' into table t1; -create table t2 (word char(20) not null); +create table t2 (word char(20) not null)ENGINE=MyISAM; load data infile '../../std_data/words.dat' into table t2; -create table t3 (word char(20) not null primary key); +create table t3 (word char(20) not null primary key)ENGINE=MyISAM; connection slave; load table t1 from master; load table t2 from master; diff --git a/mysql-test/t/rpl000009.test b/mysql-test/t/rpl000009.test index 81e9860c186..9de075efeaf 100644 --- a/mysql-test/t/rpl000009.test +++ b/mysql-test/t/rpl000009.test @@ -1,5 +1,14 @@ # This one assumes we are ignoring updates on tables in database mysqltest2, # but doing the ones in database mysqltest +################################################################# +# Change Author: JBM +# Change Date: 2006-02-02 +# Change: Added ENGINE=MyISAM +# Reason: NDB engine does not support sql_log_bin and the test is testing +# Different replication features. It is better that the test not be +# skipped due to NDB being default engine so that NDB will be used for +# Some of the testing when default is set to NDB +################################################################# source include/master-slave.inc; --disable_warnings @@ -49,13 +58,13 @@ set sql_log_bin = 0; create database mysqltest2; create database mysqltest; show databases; -create table mysqltest2.t1(n int, s char(20)); -create table mysqltest2.t2(n int, s text); +create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; +create table mysqltest2.t2(n int, s text)ENGINE=MyISAM; insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three'); insert into mysqltest2.t2 values (11, 'eleven'), (12, 'twelve'), (13, 'thirteen'); -create table mysqltest.t1(n int, s char(20)); -create table mysqltest.t2(n int, s text); +create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; +create table mysqltest.t2(n int, s text)ENGINE=MyISAM; insert into mysqltest.t1 values (1, 'one test'), (2, 'two test'), (3, 'three test'); insert into mysqltest.t2 values (11, 'eleven test'), (12, 'twelve test'), (13, 'thirteen test'); diff --git a/mysql-test/t/rpl_LD_INFILE.test b/mysql-test/t/rpl_LD_INFILE.test index 769462b5898..06c14cf109c 100644 --- a/mysql-test/t/rpl_LD_INFILE.test +++ b/mysql-test/t/rpl_LD_INFILE.test @@ -11,7 +11,6 @@ # Begin clean up test section --disable_warnings connection master; -DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; --enable_warnings @@ -23,18 +22,15 @@ DELETE FROM test.t1; LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1; -connection master; -SELECT * FROM test.t1; +SELECT * FROM test.t1 ORDER BY a DESC; save_master_pos; sync_slave_with_master; connection slave; -SELECT * FROM test.t1; - +SELECT * FROM test.t1 ORDER BY a DESC; connection master; # Lets cleanup #show binlog events; -DROP PROCEDURE IF EXISTS test.p1; DROP TABLE test.t1; # End of 5.0 test case diff --git a/mysql-test/t/rpl_auto_increment-slave.opt b/mysql-test/t/rpl_auto_increment-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/t/rpl_auto_increment-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/t/rpl_ndb_auto_inc-master.opt b/mysql-test/t/rpl_ndb_auto_inc-master.opt new file mode 100644 index 00000000000..a8a6af19da9 --- /dev/null +++ b/mysql-test/t/rpl_ndb_auto_inc-master.opt @@ -0,0 +1 @@ +--auto-increment-increment=10 --auto-increment-offset=2 diff --git a/mysql-test/t/rpl_ndb_auto_inc.test b/mysql-test/t/rpl_ndb_auto_inc.test new file mode 100644 index 00000000000..c64fe1d2f8f --- /dev/null +++ b/mysql-test/t/rpl_ndb_auto_inc.test @@ -0,0 +1,7 @@ +##################################### +# Wrapper for rpl_auto_increment.test# +##################################### +-- source include/have_innodb.inc +let $engine_type=NDB; +let $engine_type2=myisam; +-- source extra/rpl_tests/rpl_auto_increment.test diff --git a/mysql-test/t/rpl_ndb_relay_space.test b/mysql-test/t/rpl_ndb_relay_space.test new file mode 100644 index 00000000000..93b918daab6 --- /dev/null +++ b/mysql-test/t/rpl_ndb_relay_space.test @@ -0,0 +1,7 @@ +################################## +# Wrapper rpl_sv_relay_space.test# +################################## +--source include/have_ndb.inc +let $engine_type=NDB; +-- source extra/rpl_tests/rpl_sv_relay_space.test + diff --git a/mysql-test/t/rpl_relay_space_innodb-master.opt b/mysql-test/t/rpl_relay_space_innodb-master.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/t/rpl_relay_space_innodb-master.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/t/rpl_relay_space_innodb-slave.opt b/mysql-test/t/rpl_relay_space_innodb-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/t/rpl_relay_space_innodb-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/t/rpl_relay_space_innodb.test b/mysql-test/t/rpl_relay_space_innodb.test new file mode 100644 index 00000000000..33bcc00bbf9 --- /dev/null +++ b/mysql-test/t/rpl_relay_space_innodb.test @@ -0,0 +1,7 @@ +################################## +# Wrapper rpl_sv_relay_space.test# +################################## +-- source include/have_innodb.inc +let $engine_type=InnoDB; +-- source extra/rpl_tests/rpl_sv_relay_space.test + diff --git a/mysql-test/t/rpl_relay_space_myisam.test b/mysql-test/t/rpl_relay_space_myisam.test new file mode 100644 index 00000000000..05bcba54c48 --- /dev/null +++ b/mysql-test/t/rpl_relay_space_myisam.test @@ -0,0 +1,6 @@ +################################## +# Wrapper rpl_sv_relay_space.test# +################################## +let $engine_type=MyISAM; +-- source extra/rpl_tests/rpl_sv_relay_space.test + From 453eea9b9ce99dba127d3050d256ba9576b40800 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Feb 2006 15:38:27 +0100 Subject: [PATCH 2/3] Implemented requested changes by Lars and did some general test cleanup. Lots more togo mysql-test/t/rpl_relay_space_myisam.test: Added Comment mysql-test/t/rpl_ndb_relay_space.test: Added more comments BitKeeper/deleted/.del-rpl_relay_space_ndb.result~4d6013c0afef9b5e: Delete: mysql-test/r/rpl_relay_space_ndb.result mysql-test/t/rpl_relay_space_innodb.test: Added Comment BitKeeper/deleted/.del-rpl000006.test~6da9f1808deb79c7: Delete: mysql-test/t/rpl000006.test BitKeeper/deleted/.del-rpl000004.test~61532b03f9ad2734: Delete: mysql-test/t/rpl000004.test BitKeeper/deleted/.del-rpl000004.result~a3147834a662043a: Delete: mysql-test/r/rpl000004.result mysql-test/t/rpl_mixed_ddl_dml.test: Rename: mysql-test/t/rpl000002.test -> mysql-test/t/rpl_mixed_ddl_dml.test mysql-test/r/rpl_mixed_ddl_dml.result: Rename: mysql-test/r/rpl000002.result -> mysql-test/r/rpl_mixed_ddl_dml.result mysql-test/t/rpl_ignore_table_update.test: Rename: mysql-test/t/rpl000008.test -> mysql-test/t/rpl_ignore_table_update.test mysql-test/t/rpl_ignore_table_update-slave.opt: Rename: mysql-test/t/rpl000008-slave.opt -> mysql-test/t/rpl_ignore_table_update-slave.opt mysql-test/r/rpl_ignore_table_update.result: Rename: mysql-test/r/rpl000008.result -> mysql-test/r/rpl_ignore_table_update.result mysql-test/t/rpl_load_table_from_master.test: Fixing test since test where combined mysql-test/r/rpl_load_table_from_master.result: Updated results file BitKeeper/deleted/.del-rpl000004.a.result~3415f066cb91c460: Delete: mysql-test/r/rpl000004.a.result BitKeeper/deleted/.del-rpl000004.b.result~352b35351551485: Delete: mysql-test/r/rpl000004.b.result mysql-test/t/disabled.def: added rpl_ndb_relay_space Results are not deterministic mysql-test/t/rpl_load_from_master.test: Rename: mysql-test/t/rpl000009.test -> mysql-test/t/rpl_load_from_master.test mysql-test/t/rpl_load_from_master-slave.opt: Rename: mysql-test/t/rpl000009-slave.opt -> mysql-test/t/rpl_load_from_master-slave.opt mysql-test/r/rpl_load_from_master.result: Rename: mysql-test/r/rpl000009.result -> mysql-test/r/rpl_load_from_master.result mysql-test/t/rpl_temp_table.test: Rename: mysql-test/t/rpl_000012.test -> mysql-test/t/rpl_temp_table.test mysql-test/r/rpl_temp_table.result: Rename: mysql-test/r/rpl_000012.result -> mysql-test/r/rpl_temp_table.result --- mysql-test/extra/rpl_tests/rpl000006.test | 55 ----------- mysql-test/r/rpl000004.a.result | 2 - mysql-test/r/rpl000004.b.result | 2 - mysql-test/r/rpl000006.result | 29 ------ ....result => rpl_ignore_table_update.result} | 0 ...009.result => rpl_load_from_master.result} | 16 ++-- ...sult => rpl_load_table_from_master.result} | 21 +++++ ...000002.result => rpl_mixed_ddl_dml.result} | 0 mysql-test/r/rpl_relay_space_ndb.result | 25 ----- ...pl_000012.result => rpl_temp_table.result} | 0 mysql-test/t/disabled.def | 3 +- mysql-test/t/rpl000004.test | 33 ------- mysql-test/t/rpl000006.test | 2 - ....opt => rpl_ignore_table_update-slave.opt} | 0 ...0008.test => rpl_ignore_table_update.test} | 0 ...ave.opt => rpl_load_from_master-slave.opt} | 0 ...l000009.test => rpl_load_from_master.test} | 21 ++--- mysql-test/t/rpl_load_table_from_master.test | 93 +++++++++++++++++++ ...{rpl000002.test => rpl_mixed_ddl_dml.test} | 0 mysql-test/t/rpl_ndb_relay_space.test | 20 +++- mysql-test/t/rpl_relay_space_innodb.test | 20 +++- mysql-test/t/rpl_relay_space_myisam.test | 20 +++- .../{rpl_000012.test => rpl_temp_table.test} | 4 +- 23 files changed, 186 insertions(+), 180 deletions(-) delete mode 100644 mysql-test/extra/rpl_tests/rpl000006.test delete mode 100644 mysql-test/r/rpl000004.a.result delete mode 100644 mysql-test/r/rpl000004.b.result delete mode 100644 mysql-test/r/rpl000006.result rename mysql-test/r/{rpl000008.result => rpl_ignore_table_update.result} (100%) rename mysql-test/r/{rpl000009.result => rpl_load_from_master.result} (87%) rename mysql-test/r/{rpl000004.result => rpl_load_table_from_master.result} (57%) rename mysql-test/r/{rpl000002.result => rpl_mixed_ddl_dml.result} (100%) delete mode 100644 mysql-test/r/rpl_relay_space_ndb.result rename mysql-test/r/{rpl_000012.result => rpl_temp_table.result} (100%) delete mode 100644 mysql-test/t/rpl000004.test delete mode 100644 mysql-test/t/rpl000006.test rename mysql-test/t/{rpl000008-slave.opt => rpl_ignore_table_update-slave.opt} (100%) rename mysql-test/t/{rpl000008.test => rpl_ignore_table_update.test} (100%) rename mysql-test/t/{rpl000009-slave.opt => rpl_load_from_master-slave.opt} (100%) rename mysql-test/t/{rpl000009.test => rpl_load_from_master.test} (89%) create mode 100644 mysql-test/t/rpl_load_table_from_master.test rename mysql-test/t/{rpl000002.test => rpl_mixed_ddl_dml.test} (100%) rename mysql-test/t/{rpl_000012.test => rpl_temp_table.test} (93%) diff --git a/mysql-test/extra/rpl_tests/rpl000006.test b/mysql-test/extra/rpl_tests/rpl000006.test deleted file mode 100644 index e4fbe841346..00000000000 --- a/mysql-test/extra/rpl_tests/rpl000006.test +++ /dev/null @@ -1,55 +0,0 @@ -########################################################### -# Change Author: JBM -# Change Date: 2006-2-2 -# Change: Added ENGINE=$engine_type for first create table -# Reason: Only MyISAM supports load from master no need to -# run test case for other engines, in addition test will -# fail if other engines are set as default engine -########################################################### -# -# Test forced timestamp -# --- source include/master-slave.inc - -# 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=$engine_type; -insert into t1 ( a) values ('F'); -select unix_timestamp(t) from t1; -connection slave; -load table t1 from master; -select unix_timestamp(t) from t1; - -# Delete the created table on master and slave -connection master; -set SQL_LOG_BIN=1,timestamp=default; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; -connection master; - -# -# Test copying table with checksum -# - -# Don't log table creating to the slave as we want to test LOAD TABLE -set SQL_LOG_BIN=0; - -eval CREATE TABLE t1 ( - a int not null -) ENGINE=$engine_type MAX_ROWS=4000 CHECKSUM=1; -INSERT INTO t1 VALUES (1); -save_master_pos; -connection slave; -sync_with_master; -load table t1 from master; -check table t1; -drop table t1; -connection master; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/r/rpl000004.a.result b/mysql-test/r/rpl000004.a.result deleted file mode 100644 index 694d7429a14..00000000000 --- a/mysql-test/r/rpl000004.a.result +++ /dev/null @@ -1,2 +0,0 @@ -Table Op Msg_type Msg_text -test.t1 check status OK diff --git a/mysql-test/r/rpl000004.b.result b/mysql-test/r/rpl000004.b.result deleted file mode 100644 index 7e05933909e..00000000000 --- a/mysql-test/r/rpl000004.b.result +++ /dev/null @@ -1,2 +0,0 @@ -count(*) -10 diff --git a/mysql-test/r/rpl000006.result b/mysql-test/r/rpl000006.result deleted file mode 100644 index bb8d57a30cf..00000000000 --- a/mysql-test/r/rpl000006.result +++ /dev/null @@ -1,29 +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; -set SQL_LOG_BIN=0,timestamp=200006; -create table t1(t timestamp not null,a char(1))ENGINE=MyISAM; -insert into t1 ( a) values ('F'); -select unix_timestamp(t) from t1; -unix_timestamp(t) -200006 -load table t1 from master; -select unix_timestamp(t) from t1; -unix_timestamp(t) -200006 -set SQL_LOG_BIN=1,timestamp=default; -drop table t1; -set SQL_LOG_BIN=0; -CREATE TABLE t1 ( -a int not null -) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1; -INSERT INTO t1 VALUES (1); -load table t1 from master; -check table t1; -Table Op Msg_type Msg_text -test.t1 check status OK -drop table t1; -drop table t1; diff --git a/mysql-test/r/rpl000008.result b/mysql-test/r/rpl_ignore_table_update.result similarity index 100% rename from mysql-test/r/rpl000008.result rename to mysql-test/r/rpl_ignore_table_update.result diff --git a/mysql-test/r/rpl000009.result b/mysql-test/r/rpl_load_from_master.result similarity index 87% rename from mysql-test/r/rpl000009.result rename to mysql-test/r/rpl_load_from_master.result index 27569a087da..edf1f0ee7c9 100644 --- a/mysql-test/r/rpl000009.result +++ b/mysql-test/r/rpl_load_from_master.result @@ -13,11 +13,11 @@ drop database if exists mysqltest3; create database mysqltest2; create database mysqltest; create database mysqltest2; -create table mysqltest2.foo (n int); +create table mysqltest2.foo (n int)ENGINE=MyISAM; insert into mysqltest2.foo values(4); -create table mysqltest2.foo (n int); +create table mysqltest2.foo (n int)ENGINE=MyISAM; insert into mysqltest2.foo values(5); -create table mysqltest.bar (m int); +create table mysqltest.bar (m int)ENGINE=MyISAM; insert into mysqltest.bar values(15); select mysqltest2.foo.n,mysqltest.bar.m from mysqltest2.foo,mysqltest.bar; n m @@ -55,17 +55,17 @@ cluster_replication mysql test create database mysqltest2; -create table mysqltest2.t1(n int, s char(20)); +create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; insert into mysqltest2.t1 values (1, 'original foo.t1'); -create table mysqltest2.t3(n int, s char(20)); +create table mysqltest2.t3(n int, s char(20))ENGINE=MyISAM; insert into mysqltest2.t3 values (1, 'original foo.t3'); create database mysqltest3; -create table mysqltest3.t1(n int, s char(20)); +create table mysqltest3.t1(n int, s char(20))ENGINE=MyISAM; insert into mysqltest3.t1 values (1, 'original foo2.t1'); create database mysqltest; -create table mysqltest.t1(n int, s char(20)); +create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; insert into mysqltest.t1 values (1, 'original bar.t1'); -create table mysqltest.t3(n int, s char(20)); +create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM; insert into mysqltest.t3 values (1, 'original bar.t3'); load data from master; show databases; diff --git a/mysql-test/r/rpl000004.result b/mysql-test/r/rpl_load_table_from_master.result similarity index 57% rename from mysql-test/r/rpl000004.result rename to mysql-test/r/rpl_load_table_from_master.result index 42e43546ffb..308e54557fb 100644 --- a/mysql-test/r/rpl000004.result +++ b/mysql-test/r/rpl_load_table_from_master.result @@ -4,6 +4,27 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +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'); +select unix_timestamp(t) from t1; +unix_timestamp(t) +200006 +load table t1 from master; +select unix_timestamp(t) from t1; +unix_timestamp(t) +200006 +set SQL_LOG_BIN=1,timestamp=default; +drop table t1; +set SQL_LOG_BIN=0; +CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1; +INSERT INTO t1 VALUES (1); +load table t1 from master; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +drop table t1; set SQL_LOG_BIN=0; create table t1 (word char(20) not null, index(word))ENGINE=MyISAM; load data infile '../../std_data/words.dat' into table t1; diff --git a/mysql-test/r/rpl000002.result b/mysql-test/r/rpl_mixed_ddl_dml.result similarity index 100% rename from mysql-test/r/rpl000002.result rename to mysql-test/r/rpl_mixed_ddl_dml.result diff --git a/mysql-test/r/rpl_relay_space_ndb.result b/mysql-test/r/rpl_relay_space_ndb.result deleted file mode 100644 index 02bff7ae881..00000000000 --- a/mysql-test/r/rpl_relay_space_ndb.result +++ /dev/null @@ -1,25 +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; -SHOW VARIABLES LIKE 'relay_log_space_limit'; -Variable_name Value -relay_log_space_limit 0 -CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=MyISAM; -INSERT INTO t1 SET name='Andy', age=31; -INSERT t1 SET name='Jacob', age=2; -INSERT into t1 SET name='Caleb', age=1; -ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY; -SELECT * FROM t1 ORDER BY id; -name age id -Andy 31 00000001 -Jacob 2 00000002 -Caleb 1 00000003 -SELECT * FROM t1 ORDER BY id; -name age id -Andy 31 00000001 -Jacob 2 00000002 -Caleb 1 00000003 -drop table t1; diff --git a/mysql-test/r/rpl_000012.result b/mysql-test/r/rpl_temp_table.result similarity index 100% rename from mysql-test/r/rpl_000012.result rename to mysql-test/r/rpl_temp_table.result diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 11658892c54..843c5a1a2e4 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -32,6 +32,7 @@ system_mysql_db : Needs fixing system_mysql_db_fix : Needs fixing #ndb_alter_table_row : sometimes wrong error 1015!=1046 ndb_gis : garbled msgs from corrupt THD* -rpl_ndb_auto_inc.test : MySQL Bugs:17086 +rpl_ndb_auto_inc : MySQL Bugs:17086 +rpl_ndb_relay_space : Results are not deterministic # vim: set filetype=conf: diff --git a/mysql-test/t/rpl000004.test b/mysql-test/t/rpl000004.test deleted file mode 100644 index 993b804d469..00000000000 --- a/mysql-test/t/rpl000004.test +++ /dev/null @@ -1,33 +0,0 @@ -###################################### -# Change Author: JBM -# Change Date: 2006-02-02 -# Change: Added ENGINE=MyISAM -# Reason: LOAD FROM MASTER is only supported from -# MyISAM, therefore there is no reason for this test -# To use anyother Engine -###################################### -source include/master-slave.inc; - -set SQL_LOG_BIN=0; -create table t1 (word char(20) not null, index(word))ENGINE=MyISAM; -load data infile '../../std_data/words.dat' into table t1; -create table t2 (word char(20) not null)ENGINE=MyISAM; -load data infile '../../std_data/words.dat' into table t2; -create table t3 (word char(20) not null primary key)ENGINE=MyISAM; -connection slave; -load table t1 from master; -load table t2 from master; -load table t3 from master; -check table t1; -select count(*) from t2; -select count(*) from t3; -connection master; -set SQL_LOG_BIN=1; -drop table if exists t1,t2,t3; -save_master_pos; -connection slave; -sync_with_master; -create table t1(n int); -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl000006.test b/mysql-test/t/rpl000006.test deleted file mode 100644 index bca97391f8e..00000000000 --- a/mysql-test/t/rpl000006.test +++ /dev/null @@ -1,2 +0,0 @@ -let $engine_type=MyISAM; --- source extra/rpl_tests/rpl000006.test diff --git a/mysql-test/t/rpl000008-slave.opt b/mysql-test/t/rpl_ignore_table_update-slave.opt similarity index 100% rename from mysql-test/t/rpl000008-slave.opt rename to mysql-test/t/rpl_ignore_table_update-slave.opt diff --git a/mysql-test/t/rpl000008.test b/mysql-test/t/rpl_ignore_table_update.test similarity index 100% rename from mysql-test/t/rpl000008.test rename to mysql-test/t/rpl_ignore_table_update.test diff --git a/mysql-test/t/rpl000009-slave.opt b/mysql-test/t/rpl_load_from_master-slave.opt similarity index 100% rename from mysql-test/t/rpl000009-slave.opt rename to mysql-test/t/rpl_load_from_master-slave.opt diff --git a/mysql-test/t/rpl000009.test b/mysql-test/t/rpl_load_from_master.test similarity index 89% rename from mysql-test/t/rpl000009.test rename to mysql-test/t/rpl_load_from_master.test index 9de075efeaf..eabae3ed399 100644 --- a/mysql-test/t/rpl000009.test +++ b/mysql-test/t/rpl_load_from_master.test @@ -4,10 +4,7 @@ # Change Author: JBM # Change Date: 2006-02-02 # Change: Added ENGINE=MyISAM -# Reason: NDB engine does not support sql_log_bin and the test is testing -# Different replication features. It is better that the test not be -# skipped due to NDB being default engine so that NDB will be used for -# Some of the testing when default is set to NDB +# Reason: LOAD from master is only supported by MyISAM ################################################################# source include/master-slave.inc; @@ -28,12 +25,12 @@ save_master_pos; connection slave; sync_with_master; create database mysqltest2; -create table mysqltest2.foo (n int); +create table mysqltest2.foo (n int)ENGINE=MyISAM; insert into mysqltest2.foo values(4); connection master; -create table mysqltest2.foo (n int); +create table mysqltest2.foo (n int)ENGINE=MyISAM; insert into mysqltest2.foo values(5); -create table mysqltest.bar (m int); +create table mysqltest.bar (m int)ENGINE=MyISAM; insert into mysqltest.bar values(15); save_master_pos; connection slave; @@ -78,21 +75,21 @@ show databases; # Create mysqltest2 and mysqltest3 on slave; we expect that LOAD DATA FROM # MASTER will neither touch database mysqltest nor mysqltest3 create database mysqltest2; -create table mysqltest2.t1(n int, s char(20)); +create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; insert into mysqltest2.t1 values (1, 'original foo.t1'); -create table mysqltest2.t3(n int, s char(20)); +create table mysqltest2.t3(n int, s char(20))ENGINE=MyISAM; insert into mysqltest2.t3 values (1, 'original foo.t3'); create database mysqltest3; -create table mysqltest3.t1(n int, s char(20)); +create table mysqltest3.t1(n int, s char(20))ENGINE=MyISAM; insert into mysqltest3.t1 values (1, 'original foo2.t1'); # Create mysqltest, and mysqltest.t1, to check that it gets replaced, # and mysqltest.t3 to check that it is not touched (there is no # mysqltest.t3 on master) create database mysqltest; -create table mysqltest.t1(n int, s char(20)); +create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; insert into mysqltest.t1 values (1, 'original bar.t1'); -create table mysqltest.t3(n int, s char(20)); +create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM; insert into mysqltest.t3 values (1, 'original bar.t3'); load data from master; diff --git a/mysql-test/t/rpl_load_table_from_master.test b/mysql-test/t/rpl_load_table_from_master.test new file mode 100644 index 00000000000..c1397a175d9 --- /dev/null +++ b/mysql-test/t/rpl_load_table_from_master.test @@ -0,0 +1,93 @@ +########################################################### +# Change Author: JBM +# Change Date: 2006-2-2 +# Change: Added ENGINE=$engine_type for first create table +# Reason: Only MyISAM supports load from master no need to +# run test case for other engines, in addition test will +# fail if other engines are set as default engine +########################################################### +# Change Author: JBM +# Change Date: 2006-2-3 +# Change: removed ENGINE=$engine_type for first create table +# and renamed test file to rpl_load_table_from_master.test. +# In addition added test requirements. +# Reason: Request from review. +############################################################ +# 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 + +# 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; +INSERT INTO t1 ( a) VALUE ('F'); +select unix_timestamp(t) from t1; +connection slave; +load table t1 from master; +select unix_timestamp(t) from t1; + +# Delete the created table on master and slave +connection master; +set SQL_LOG_BIN=1,timestamp=default; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; +connection master; + +# +# Test copying table with checksum +# + +# Don't log table creating to the slave as we want to test LOAD TABLE +set SQL_LOG_BIN=0; + +eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1; +INSERT INTO t1 VALUES (1); +save_master_pos; +connection slave; +sync_with_master; +load table t1 from master; +check table t1; +drop table t1; +connection master; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; + +connection master; +set SQL_LOG_BIN=0; +create table t1 (word char(20) not null, index(word))ENGINE=MyISAM; +load data infile '../../std_data/words.dat' into table t1; +create table t2 (word char(20) not null)ENGINE=MyISAM; +load data infile '../../std_data/words.dat' into table t2; +create table t3 (word char(20) not null primary key)ENGINE=MyISAM; +connection slave; +load table t1 from master; +load table t2 from master; +load table t3 from master; +check table t1; +select count(*) from t2; +select count(*) from t3; +connection master; +set SQL_LOG_BIN=1; +drop table if exists t1,t2,t3; +save_master_pos; +connection slave; +sync_with_master; +create table t1(n int); +drop table t1; + + + + + +# End of 4.1 tests diff --git a/mysql-test/t/rpl000002.test b/mysql-test/t/rpl_mixed_ddl_dml.test similarity index 100% rename from mysql-test/t/rpl000002.test rename to mysql-test/t/rpl_mixed_ddl_dml.test diff --git a/mysql-test/t/rpl_ndb_relay_space.test b/mysql-test/t/rpl_ndb_relay_space.test index 93b918daab6..0484d807996 100644 --- a/mysql-test/t/rpl_ndb_relay_space.test +++ b/mysql-test/t/rpl_ndb_relay_space.test @@ -1,6 +1,20 @@ -################################## -# Wrapper rpl_sv_relay_space.test# -################################## +################################### +# Wrapper rpl_sv_relay_space.test # +# This test has to be wrapped as # +# It tests ndb, innodb and MyISAM.# +# By Wrapping we are saving some # +# space and making the test more # +# Maintainable by only having one # +# test file and reusing the code # +# In Addition, INNODB has to have # +# Option files during this test # +# to force innodb on the slave # +# else the test will fail # +################################### +#Change Author: JBM # +#Change Date: 2006-02-03 # +#Change: Added Comments # +################################### --source include/have_ndb.inc let $engine_type=NDB; -- source extra/rpl_tests/rpl_sv_relay_space.test diff --git a/mysql-test/t/rpl_relay_space_innodb.test b/mysql-test/t/rpl_relay_space_innodb.test index 33bcc00bbf9..90276d87523 100644 --- a/mysql-test/t/rpl_relay_space_innodb.test +++ b/mysql-test/t/rpl_relay_space_innodb.test @@ -1,6 +1,20 @@ -################################## -# Wrapper rpl_sv_relay_space.test# -################################## +################################### +# Wrapper rpl_sv_relay_space.test # +# This test has to be wrapped as # +# It tests ndb, innodb and MyISAM.# +# By Wrapping we are saving some # +# space and making the test more # +# Maintainable by only having one # +# test file and reusing the code # +# In Addition, INNODB has to have # +# Option files during this test # +# to force innodb on the slave # +# else the test will fail # +################################### +#Change Author: JBM # +#Change Date: 2006-02-03 # +#Change: Added Comments # +################################### -- source include/have_innodb.inc let $engine_type=InnoDB; -- source extra/rpl_tests/rpl_sv_relay_space.test diff --git a/mysql-test/t/rpl_relay_space_myisam.test b/mysql-test/t/rpl_relay_space_myisam.test index 05bcba54c48..cb129f7c87a 100644 --- a/mysql-test/t/rpl_relay_space_myisam.test +++ b/mysql-test/t/rpl_relay_space_myisam.test @@ -1,6 +1,20 @@ -################################## -# Wrapper rpl_sv_relay_space.test# -################################## +################################### +# Wrapper rpl_sv_relay_space.test # +# This test has to be wrapped as # +# It tests ndb, innodb and MyISAM.# +# By Wrapping we are saving some # +# space and making the test more # +# Maintainable by only having one # +# test file and reusing the code # +# In Addition, INNODB has to have # +# Option files during this test # +# to force innodb on the slave # +# else the test will fail # +################################### +#Change Author: JBM # +#Change Date: 2006-02-03 # +#Change: Added Comments # +################################### let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_sv_relay_space.test diff --git a/mysql-test/t/rpl_000012.test b/mysql-test/t/rpl_temp_table.test similarity index 93% rename from mysql-test/t/rpl_000012.test rename to mysql-test/t/rpl_temp_table.test index 17f1d38dbae..c29fa8e676d 100644 --- a/mysql-test/t/rpl_000012.test +++ b/mysql-test/t/rpl_temp_table.test @@ -1,7 +1,7 @@ # drop table t1 t2 t3 are included int master-slave.inc -# Like rpl000013, meaningful only in statement-based: +# meaningful only in statement-based: + -- source include/have_binlog_format_statement.inc -# Should work on both stm and row -- source include/master-slave.inc From 32e3f4612505662d37085ddd8cb97aecdda43486 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Feb 2006 00:18:10 +0100 Subject: [PATCH 3/3] More test case updates for using RPL with NDB as default engine mysql-test/t/rpl_create_database.test: Updated to pass when other default engines are being used mysql-test/r/rpl_create_database.result: Updated to pass when other default engines are being used mysql-test/t/rpl_row_func003-slave.opt: new opt file to enusre innodb on slave mysql-test/t/rpl_replicate_do.test: Updated with order by for use during ndb testing mysql-test/r/rpl_replicate_do.result: Updated with order by for use during ndb testing mysql-test/t/rpl_redirect.test: updated with order by mysql-test/r/rpl_redirect.result: updated with order by mysql-test/t/rpl_ndb_func003.test: New func003 wrapper to use NDB engine for table creation mysql-test/r/rpl_ndb_func003.result: New func003 wrapper to use NDB engine for table creation mysql-test/r/rpl_row_sp001.result: updated with order by mysql-test/t/rpl_row_sp001.test: updated with order by BitKeeper/deleted/.del-rpl_row_log.test~f6ed1be9e3ca110f: Delete: mysql-test/extra/rpl_tests/rpl_row_log.test mysql-test/extra/rpl_tests/rpl_log.test: Updated test to ensure that MyISAM, and innodb engines passed even if NDB was used as default engine. Due to diff in bin log output between MyISAM, InnoDB and NDB the file had to use different wrappers and results files. mysql-test/t/rpl_row_log.test: part of rpl_log.test check in mysql-test/r/rpl_row_log.result: part of rpl_log.test check in mysql-test/r/rpl_row_log_innodb.result: part of rpl_log.test check in mysql-test/t/rpl_row_log_innodb-master.opt: part of rpl_log.test check in mysql-test/t/rpl_row_log_innodb-slave.opt: part of rpl_log.test check in mysql-test/t/rpl_row_log_innodb.test: part of rpl_log.test check in mysql-test/r/rpl_ndb_log.result: part of rpl_log.test check in mysql-test/t/rpl_ndb_log.test: part of rpl_log.test check in mysql-test/t/rpl_ndb_log-master.opt: part of rpl_log.test check in mysql-test/t/disabled.def: Updated with MySQL Bugs: #17158 --- mysql-test/extra/rpl_tests/rpl_log.test | 16 ++- mysql-test/r/rpl_create_database.result | 18 ++- mysql-test/r/rpl_ndb_func003.result | 29 +++++ mysql-test/r/rpl_ndb_log.result | 139 +++++++++++++++++++++ mysql-test/r/rpl_redirect.result | 8 +- mysql-test/r/rpl_replicate_do.result | 2 +- mysql-test/r/rpl_row_log.result | 42 +++---- mysql-test/r/rpl_row_log_innodb.result | 113 +++++++++++++++++ mysql-test/r/rpl_row_sp001.result | 16 +-- mysql-test/t/disabled.def | 1 + mysql-test/t/rpl_create_database.test | 6 +- mysql-test/t/rpl_ndb_func003.test | 11 ++ mysql-test/t/rpl_ndb_log-master.opt | 1 + mysql-test/t/rpl_ndb_log.test | 12 ++ mysql-test/t/rpl_redirect.test | 8 +- mysql-test/t/rpl_replicate_do.test | 2 +- mysql-test/t/rpl_row_func003-slave.opt | 1 + mysql-test/t/rpl_row_log.test | 9 +- mysql-test/t/rpl_row_log_innodb-master.opt | 1 + mysql-test/t/rpl_row_log_innodb-slave.opt | 1 + mysql-test/t/rpl_row_log_innodb.test | 12 ++ mysql-test/t/rpl_row_sp001.test | 16 +-- 22 files changed, 400 insertions(+), 64 deletions(-) create mode 100644 mysql-test/r/rpl_ndb_func003.result create mode 100644 mysql-test/r/rpl_ndb_log.result create mode 100644 mysql-test/r/rpl_row_log_innodb.result create mode 100644 mysql-test/t/rpl_ndb_func003.test create mode 100644 mysql-test/t/rpl_ndb_log-master.opt create mode 100644 mysql-test/t/rpl_ndb_log.test create mode 100644 mysql-test/t/rpl_row_func003-slave.opt create mode 100644 mysql-test/t/rpl_row_log_innodb-master.opt create mode 100644 mysql-test/t/rpl_row_log_innodb-slave.opt create mode 100644 mysql-test/t/rpl_row_log_innodb.test diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test index 252c1fcca41..1e5074d9260 100644 --- a/mysql-test/extra/rpl_tests/rpl_log.test +++ b/mysql-test/extra/rpl_tests/rpl_log.test @@ -30,21 +30,25 @@ let $VERSION=`select version()`; connection master; reset master; -create table t1(n int not null auto_increment primary key); +eval create table t1(n int not null auto_increment primary key)ENGINE=$engine_type; insert into t1 values (NULL); drop table t1; -create table t1 (word char(20) not null); +eval create table t1 (word char(20) not null)ENGINE=$engine_type; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines; select count(*) from t1; drop table t1; --replace_result $VERSION VERSION --replace_column 2 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// show binlog events; --replace_column 2 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// show binlog events from 102 limit 1; --replace_column 2 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// show binlog events from 102 limit 2; --replace_column 2 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// show binlog events from 102 limit 2,1; flush logs; @@ -64,7 +68,7 @@ flush logs; # To make it predictable, we do a useless update now, but which has the # interest of making the slave catch both rotate events. -create table t5 (a int); +eval create table t5 (a int)ENGINE=$engine_type; drop table t5; # Sync slave and force it to start on another binary log @@ -82,14 +86,16 @@ connection master; # Create some entries for second log -create table t1 (n int); +eval create table t1 (n int)ENGINE=$engine_type; insert into t1 values (1); drop table t1; --replace_result $VERSION VERSION --replace_column 2 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// show binlog events; --replace_result $VERSION VERSION --replace_column 2 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// show binlog events in 'master-bin.000002'; show binary logs; save_master_pos; @@ -99,9 +105,11 @@ sync_with_master; show binary logs; --replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION --replace_column 2 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// show binlog events in 'slave-bin.000001' from 4; --replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION --replace_column 2 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// show binlog events in 'slave-bin.000002' from 4; --replace_result $MASTER_MYPORT MASTER_PORT --replace_column 1 # 8 # 9 # 16 # 23 # 33 # diff --git a/mysql-test/r/rpl_create_database.result b/mysql-test/r/rpl_create_database.result index 74708c8ec9a..cb3c7944962 100644 --- a/mysql-test/r/rpl_create_database.result +++ b/mysql-test/r/rpl_create_database.result @@ -61,16 +61,14 @@ mysql mysqltest_prometheus mysqltest_sisyfos test -SHOW CREATE TABLE mysqltest_prometheus.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW CREATE TABLE mysqltest_sisyfos.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 +USE mysqltest_prometheus; +SHOW TABLES; +Tables_in_mysqltest_prometheus +t1 +USE mysqltest_sisyfos; +SHOW TABLES; +Tables_in_mysqltest_sisyfos +t2 DROP DATABASE IF EXISTS mysqltest_prometheus; DROP DATABASE IF EXISTS mysqltest_sisyfos; DROP DATABASE IF EXISTS mysqltest_bob; diff --git a/mysql-test/r/rpl_ndb_func003.result b/mysql-test/r/rpl_ndb_func003.result new file mode 100644 index 00000000000..ad72a3fb244 --- /dev/null +++ b/mysql-test/r/rpl_ndb_func003.result @@ -0,0 +1,29 @@ +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; +DROP FUNCTION IF EXISTS test.f1; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=NDB; +create function test.f1() RETURNS CHAR(16) +BEGIN +DECLARE tmp CHAR(16); +DECLARE var_name FLOAT; +SET var_name = RAND(); +IF var_name > .6 +THEN SET tmp = 'Texas'; +ELSE SET tmp = 'MySQL'; +END IF; +RETURN tmp; +END| +INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); +INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); +SET AUTOCOMMIT=0; +START TRANSACTION; +INSERT INTO test.t1 VALUES (null,test.f1()); +ROLLBACK; +SET AUTOCOMMIT=1; +DROP FUNCTION test.f1; +DROP TABLE test.t1; diff --git a/mysql-test/r/rpl_ndb_log.result b/mysql-test/r/rpl_ndb_log.result new file mode 100644 index 00000000000..523495e284f --- /dev/null +++ b/mysql-test/r/rpl_ndb_log.result @@ -0,0 +1,139 @@ +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; +stop slave; +reset master; +reset slave; +reset master; +create table t1(n int not null auto_increment primary key)ENGINE=NDB; +insert into t1 values (NULL); +drop table t1; +create table t1 (word char(20) not null)ENGINE=NDB; +load data infile '../../std_data/words.dat' into table t1 ignore 1 lines; +select count(*) from t1; +count(*) +69 +drop table t1; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB +master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Table_map 1 # cluster_replication.apply_status +master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # test.t1 +master-bin.000001 # Write_rows 1 # +master-bin.000001 # Query 1 # COMMIT +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB +master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Table_map 1 # cluster_replication.apply_status +master-bin.000001 # Write_rows 1 # +master-bin.000001 # Query 1 # COMMIT +master-bin.000001 # Query 1 # use `test`; drop table t1 +show binlog events from 102 limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB +show binlog events from 102 limit 2; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB +master-bin.000001 # Query 1 # BEGIN +show binlog events from 102 limit 2,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map 1 # cluster_replication.apply_status +flush logs; +create table t5 (a int)ENGINE=NDB; +drop table t5; +start slave; +flush logs; +stop slave; +create table t1 (n int)ENGINE=NDB; +insert into t1 values (1); +drop table t1; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB +master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Table_map 1 # cluster_replication.apply_status +master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # test.t1 +master-bin.000001 # Write_rows 1 # +master-bin.000001 # Query 1 # COMMIT +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB +master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Table_map 1 # cluster_replication.apply_status +master-bin.000001 # Write_rows 1 # +master-bin.000001 # Query 1 # COMMIT +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 +show binlog events in 'master-bin.000002'; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000002 # Query 1 # use `test`; create table t5 (a int)ENGINE=NDB +master-bin.000002 # Query 1 # BEGIN +master-bin.000002 # Table_map 1 # cluster_replication.apply_status +master-bin.000002 # Write_rows 1 # +master-bin.000002 # Query 1 # COMMIT +master-bin.000002 # Query 1 # use `test`; drop table t5 +master-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=NDB +master-bin.000002 # Query 1 # BEGIN +master-bin.000002 # Table_map 1 # cluster_replication.apply_status +master-bin.000002 # Write_rows 1 # +master-bin.000002 # Table_map 1 # test.t1 +master-bin.000002 # Write_rows 1 # +master-bin.000002 # Query 1 # COMMIT +master-bin.000002 # Query 1 # use `test`; drop table t1 +show binary logs; +Log_name File_size +master-bin.000001 1087 +master-bin.000002 991 +start slave; +show binary logs; +Log_name File_size +slave-bin.000001 1494 +slave-bin.000002 583 +show binlog events in 'slave-bin.000001' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB +slave-bin.000001 # Query 2 # BEGIN +slave-bin.000001 # Table_map 2 # cluster_replication.apply_status +slave-bin.000001 # Write_rows 2 # +slave-bin.000001 # Table_map 2 # test.t1 +slave-bin.000001 # Write_rows 2 # +slave-bin.000001 # Query 2 # COMMIT +slave-bin.000001 # Query 1 # use `test`; drop table t1 +slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB +slave-bin.000001 # Query 2 # BEGIN +slave-bin.000001 # Table_map 2 # cluster_replication.apply_status +slave-bin.000001 # Write_rows 2 # +slave-bin.000001 # Query 2 # COMMIT +slave-bin.000001 # Query 1 # use `test`; drop table t1 +slave-bin.000001 # Query 1 # use `test`; create table t5 (a int)ENGINE=NDB +slave-bin.000001 # Query 2 # BEGIN +slave-bin.000001 # Table_map 2 # cluster_replication.apply_status +slave-bin.000001 # Write_rows 2 # +slave-bin.000001 # Query 2 # COMMIT +slave-bin.000001 # Query 1 # use `test`; drop table t5 +slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 +show binlog events in 'slave-bin.000002' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=NDB +slave-bin.000002 # Query 2 # BEGIN +slave-bin.000002 # Table_map 2 # cluster_replication.apply_status +slave-bin.000002 # Write_rows 2 # +slave-bin.000002 # Table_map 2 # test.t1 +slave-bin.000002 # Write_rows 2 # +slave-bin.000002 # Query 2 # COMMIT +slave-bin.000002 # Query 1 # use `test`; drop table t1 +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 991 # # master-bin.000002 Yes Yes # 0 0 991 # None 0 No # +show binlog events in 'slave-bin.000005' from 4; +ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log diff --git a/mysql-test/r/rpl_redirect.result b/mysql-test/r/rpl_redirect.result index 9dd51eaba4d..b4ef84da559 100644 --- a/mysql-test/r/rpl_redirect.result +++ b/mysql-test/r/rpl_redirect.result @@ -12,26 +12,26 @@ Server_id Host Port Rpl_recovery_rank Master_id create table t1 ( n int); insert into t1 values (1),(2),(3),(4); insert into t1 values(5); -select * from t1; +SELECT * FROM t1 ORDER BY n; n 1 2 3 4 5 -select * from t1; +SELECT * FROM t1 ORDER BY n; n 1 2 3 4 -select * from t1; +SELECT * FROM t1 ORDER BY n; n 1 2 3 4 -select * from t1; +SELECT * FROM t1 ORDER BY n; n 1 2 diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result index 438671fb103..9f7e1a81507 100644 --- a/mysql-test/r/rpl_replicate_do.result +++ b/mysql-test/r/rpl_replicate_do.result @@ -16,7 +16,7 @@ insert into t1 values(15),(16),(17); update t1 set m=20 where m=16; delete from t1 where m=17; create table t11 select * from t1; -select * from t1; +select * from t1 ORDER BY m; m 15 20 diff --git a/mysql-test/r/rpl_row_log.result b/mysql-test/r/rpl_row_log.result index 8784d9d16e2..85c93702de2 100644 --- a/mysql-test/r/rpl_row_log.result +++ b/mysql-test/r/rpl_row_log.result @@ -8,10 +8,10 @@ stop slave; reset master; reset slave; reset master; -create table t1(n int not null auto_increment primary key); +create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; insert into t1 values (NULL); drop table t1; -create table t1 (word char(20) not null); +create table t1 (word char(20) not null)ENGINE=MyISAM; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines; select count(*) from t1; count(*) @@ -20,41 +20,41 @@ drop table t1; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM master-bin.000001 # Table_map 1 # test.t1 master-bin.000001 # Write_rows 1 # master-bin.000001 # Query 1 # use `test`; drop table t1 -master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null) +master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM master-bin.000001 # Table_map 1 # test.t1 master-bin.000001 # Write_rows 1 # master-bin.000001 # Query 1 # use `test`; drop table t1 show binlog events from 102 limit 1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM show binlog events from 102 limit 2; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM master-bin.000001 # Table_map 1 # test.t1 show binlog events from 102 limit 2,1; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Write_rows 1 # flush logs; -create table t5 (a int); +create table t5 (a int)ENGINE=MyISAM; drop table t5; start slave; flush logs; stop slave; -create table t1 (n int); +create table t1 (n int)ENGINE=MyISAM; insert into t1 values (1); drop table t1; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM master-bin.000001 # Table_map 1 # test.t1 master-bin.000001 # Write_rows 1 # master-bin.000001 # Query 1 # use `test`; drop table t1 -master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null) +master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM master-bin.000001 # Table_map 1 # test.t1 master-bin.000001 # Write_rows 1 # master-bin.000001 # Query 1 # use `test`; drop table t1 @@ -62,44 +62,44 @@ master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 show binlog events in 'master-bin.000002'; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 -master-bin.000002 # Query 1 # use `test`; create table t5 (a int) +master-bin.000002 # Query 1 # use `test`; create table t5 (a int)ENGINE=MyISAM master-bin.000002 # Query 1 # use `test`; drop table t5 -master-bin.000002 # Query 1 # use `test`; create table t1 (n int) +master-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=MyISAM master-bin.000002 # Table_map 1 # test.t1 master-bin.000002 # Write_rows 1 # master-bin.000002 # Query 1 # use `test`; drop table t1 show binary logs; Log_name File_size -master-bin.000001 1306 -master-bin.000002 499 +master-bin.000001 1332 +master-bin.000002 525 start slave; show binary logs; Log_name File_size -slave-bin.000001 1467 -slave-bin.000002 337 +slave-bin.000001 1506 +slave-bin.000002 350 show binlog events in 'slave-bin.000001' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 -slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key) +slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM slave-bin.000001 # Table_map 1 # test.t1 slave-bin.000001 # Write_rows 1 # slave-bin.000001 # Query 1 # use `test`; drop table t1 -slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null) +slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM slave-bin.000001 # Table_map 1 # test.t1 slave-bin.000001 # Write_rows 1 # slave-bin.000001 # Query 1 # use `test`; drop table t1 -slave-bin.000001 # Query 1 # use `test`; create table t5 (a int) +slave-bin.000001 # Query 1 # use `test`; create table t5 (a int)ENGINE=MyISAM slave-bin.000001 # Query 1 # use `test`; drop table t5 slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 show binlog events in 'slave-bin.000002' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 -slave-bin.000002 # Query 1 # use `test`; create table t1 (n int) +slave-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=MyISAM slave-bin.000002 # Table_map 1 # test.t1 slave-bin.000002 # Write_rows 1 # slave-bin.000002 # Query 1 # use `test`; drop table t1 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 499 # # master-bin.000002 Yes Yes # 0 0 499 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 525 # # master-bin.000002 Yes Yes # 0 0 525 # None 0 No # show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log diff --git a/mysql-test/r/rpl_row_log_innodb.result b/mysql-test/r/rpl_row_log_innodb.result new file mode 100644 index 00000000000..2bc7534f31f --- /dev/null +++ b/mysql-test/r/rpl_row_log_innodb.result @@ -0,0 +1,113 @@ +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; +stop slave; +reset master; +reset slave; +reset master; +create table t1(n int not null auto_increment primary key)ENGINE=InnoDB; +insert into t1 values (NULL); +drop table t1; +create table t1 (word char(20) not null)ENGINE=InnoDB; +load data infile '../../std_data/words.dat' into table t1 ignore 1 lines; +select count(*) from t1; +count(*) +69 +drop table t1; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +master-bin.000001 # Table_map 1 # test.t1 +master-bin.000001 # Write_rows 1 # +master-bin.000001 # Xid 1 # COMMIT /* XID */ +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB +master-bin.000001 # Table_map 1 # test.t1 +master-bin.000001 # Write_rows 1 # +master-bin.000001 # Xid 1 # COMMIT /* XID */ +master-bin.000001 # Query 1 # use `test`; drop table t1 +show binlog events from 102 limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +show binlog events from 102 limit 2; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +master-bin.000001 # Table_map 1 # test.t1 +show binlog events from 102 limit 2,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Write_rows 1 # +flush logs; +create table t5 (a int)ENGINE=InnoDB; +drop table t5; +start slave; +flush logs; +stop slave; +create table t1 (n int)ENGINE=InnoDB; +insert into t1 values (1); +drop table t1; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +master-bin.000001 # Table_map 1 # test.t1 +master-bin.000001 # Write_rows 1 # +master-bin.000001 # Xid 1 # COMMIT /* XID */ +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB +master-bin.000001 # Table_map 1 # test.t1 +master-bin.000001 # Write_rows 1 # +master-bin.000001 # Xid 1 # COMMIT /* XID */ +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 +show binlog events in 'master-bin.000002'; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000002 # Query 1 # use `test`; create table t5 (a int)ENGINE=InnoDB +master-bin.000002 # Query 1 # use `test`; drop table t5 +master-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=InnoDB +master-bin.000002 # Table_map 1 # test.t1 +master-bin.000002 # Write_rows 1 # +master-bin.000002 # Xid 1 # COMMIT /* XID */ +master-bin.000002 # Query 1 # use `test`; drop table t1 +show binary logs; +Log_name File_size +master-bin.000001 1386 +master-bin.000002 552 +start slave; +show binary logs; +Log_name File_size +slave-bin.000001 1560 +slave-bin.000002 377 +show binlog events in 'slave-bin.000001' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +slave-bin.000001 # Table_map 1 # test.t1 +slave-bin.000001 # Write_rows 1 # +slave-bin.000001 # Xid 1 # COMMIT /* XID */ +slave-bin.000001 # Query 1 # use `test`; drop table t1 +slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB +slave-bin.000001 # Table_map 1 # test.t1 +slave-bin.000001 # Write_rows 1 # +slave-bin.000001 # Xid 1 # COMMIT /* XID */ +slave-bin.000001 # Query 1 # use `test`; drop table t1 +slave-bin.000001 # Query 1 # use `test`; create table t5 (a int)ENGINE=InnoDB +slave-bin.000001 # Query 1 # use `test`; drop table t5 +slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 +show binlog events in 'slave-bin.000002' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=InnoDB +slave-bin.000002 # Table_map 1 # test.t1 +slave-bin.000002 # Write_rows 1 # +slave-bin.000002 # Xid 1 # COMMIT /* XID */ +slave-bin.000002 # Query 1 # use `test`; drop table t1 +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 552 # # master-bin.000002 Yes Yes # 0 0 552 # None 0 No # +show binlog events in 'slave-bin.000005' from 4; +ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log diff --git a/mysql-test/r/rpl_row_sp001.result b/mysql-test/r/rpl_row_sp001.result index 0276fb721b9..8c26c061376 100644 --- a/mysql-test/r/rpl_row_sp001.result +++ b/mysql-test/r/rpl_row_sp001.result @@ -28,52 +28,52 @@ UPDATE test.t2 set t ='NONE'; END CASE; end// INSERT INTO test.t2 VALUES(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'); -select * from test.t2; +SELECT * FROM t2 ORDER BY a; a t 1 NEW 2 NEW 3 NEW 4 NEW -select * from test.t2; +SELECT * FROM t2 ORDER BY a; a t 1 NEW 2 NEW 3 NEW 4 NEW call test.p2(1); -select * from test.t2; +SELECT * FROM t2 ORDER BY a; a t 1 Tex 2 Tex 3 Tex 4 Tex -select * from test.t2; +SELECT * FROM t2 ORDER BY a; a t 1 Tex 2 Tex 3 Tex 4 Tex call test.p2(2); -select * from test.t2; +SELECT * FROM t2 ORDER BY a; a t 1 SQL 2 SQL 3 SQL 4 SQL -select * from test.t2; +SELECT * FROM t2 ORDER BY a; a t 1 SQL 2 SQL 3 SQL 4 SQL call test.p2(3); -select * from test.t2; +SELECT * FROM t2 ORDER BY a; a t 1 NONE 2 NONE 3 NONE 4 NONE -select * from test.t2; +SELECT * FROM t2 ORDER BY a; a t 1 NONE 2 NONE diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index a002a34796f..4ffce33766a 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -32,3 +32,4 @@ ndb_gis : garbled msgs from corrupt THD* rpl_ndb_auto_inc : MySQL Bugs:17086 rpl_ndb_relay_space : Results are not deterministic ndb_binlog_ddl_multi : Bug #17038 +rpl_ndb_log : MySQL Bugs: #17158 diff --git a/mysql-test/t/rpl_create_database.test b/mysql-test/t/rpl_create_database.test index 7ec73132113..70cff8daca2 100644 --- a/mysql-test/t/rpl_create_database.test +++ b/mysql-test/t/rpl_create_database.test @@ -58,8 +58,10 @@ let $VERSION=`select version()`; SHOW DATABASES; sync_slave_with_master; SHOW DATABASES; -SHOW CREATE TABLE mysqltest_prometheus.t1; -SHOW CREATE TABLE mysqltest_sisyfos.t2; +USE mysqltest_prometheus; +SHOW TABLES; +USE mysqltest_sisyfos; +SHOW TABLES; connection master; DROP DATABASE IF EXISTS mysqltest_prometheus; diff --git a/mysql-test/t/rpl_ndb_func003.test b/mysql-test/t/rpl_ndb_func003.test new file mode 100644 index 00000000000..2d240385555 --- /dev/null +++ b/mysql-test/t/rpl_ndb_func003.test @@ -0,0 +1,11 @@ +################################### +# Wrapper for rpl_row_func003.test# +# This test was orginally designed# +# To test InnoDB using RBR, but # +# It can also be used to test NDB # +# So this wrapper is being used to# +# reduce test case code # +################################### +-- source include/have_ndb.inc +let $engine_type=NDB; +-- source extra/rpl_tests/rpl_row_func003.test diff --git a/mysql-test/t/rpl_ndb_log-master.opt b/mysql-test/t/rpl_ndb_log-master.opt new file mode 100644 index 00000000000..e0d075c3fbd --- /dev/null +++ b/mysql-test/t/rpl_ndb_log-master.opt @@ -0,0 +1 @@ +--skip-external-locking diff --git a/mysql-test/t/rpl_ndb_log.test b/mysql-test/t/rpl_ndb_log.test new file mode 100644 index 00000000000..e883d24b977 --- /dev/null +++ b/mysql-test/t/rpl_ndb_log.test @@ -0,0 +1,12 @@ +################################### +# Wrapper for rpl_row_log.test # +# Added wrapper so that MyISAM & # +# Innodb and NDB could all use the# +# Same test. NDB produced a diff # +# bin-log # +################################### +-- source include/have_binlog_format_row.inc +-- source include/have_ndb.inc +let $engine_type=NDB; +-- source extra/rpl_tests/rpl_log.test + diff --git a/mysql-test/t/rpl_redirect.test b/mysql-test/t/rpl_redirect.test index c001d85d2f8..58321babb39 100644 --- a/mysql-test/t/rpl_redirect.test +++ b/mysql-test/t/rpl_redirect.test @@ -32,12 +32,12 @@ insert into t1 values(5); connection master; enable_rpl_parse; # The first of the queries will be sent to the slave, the second to the master. -select * from t1; -select * from t1; +SELECT * FROM t1 ORDER BY n; +SELECT * FROM t1 ORDER BY n; disable_rpl_parse; -select * from t1; +SELECT * FROM t1 ORDER BY n; connection slave; -select * from t1; +SELECT * FROM t1 ORDER BY n; drop table t1; connection master; drop table t1; diff --git a/mysql-test/t/rpl_replicate_do.test b/mysql-test/t/rpl_replicate_do.test index 5a2cb50d53a..c9294175f15 100644 --- a/mysql-test/t/rpl_replicate_do.test +++ b/mysql-test/t/rpl_replicate_do.test @@ -21,7 +21,7 @@ create table t11 select * from t1; save_master_pos; connection slave; sync_with_master; -select * from t1; +select * from t1 ORDER BY m; select * from t2; --error 1146 select * from t11; diff --git a/mysql-test/t/rpl_row_func003-slave.opt b/mysql-test/t/rpl_row_func003-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/t/rpl_row_func003-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/t/rpl_row_log.test b/mysql-test/t/rpl_row_log.test index 29abf5bb93e..5a9b21165e5 100644 --- a/mysql-test/t/rpl_row_log.test +++ b/mysql-test/t/rpl_row_log.test @@ -1,4 +1,11 @@ -# Requires row base logging +################################### +# Wrapper for rpl_row_log.test # +# Added wrapper so that MyISAM & # +# Innodb and NDB could all use the# +# Same test. NDB produced a diff # +# bin-log # +################################### -- source include/have_binlog_format_row.inc +let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_log.test diff --git a/mysql-test/t/rpl_row_log_innodb-master.opt b/mysql-test/t/rpl_row_log_innodb-master.opt new file mode 100644 index 00000000000..e0d075c3fbd --- /dev/null +++ b/mysql-test/t/rpl_row_log_innodb-master.opt @@ -0,0 +1 @@ +--skip-external-locking diff --git a/mysql-test/t/rpl_row_log_innodb-slave.opt b/mysql-test/t/rpl_row_log_innodb-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/t/rpl_row_log_innodb-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/t/rpl_row_log_innodb.test b/mysql-test/t/rpl_row_log_innodb.test new file mode 100644 index 00000000000..f4a9cf06291 --- /dev/null +++ b/mysql-test/t/rpl_row_log_innodb.test @@ -0,0 +1,12 @@ +################################### +# Wrapper for rpl_row_log.test # +# Added wrapper so that MyISAM & # +# Innodb and NDB could all use the# +# Same test. NDB produced a diff # +# bin-log # +################################### +-- source include/have_binlog_format_row.inc +-- source include/have_innodb.inc +let $engine_type=InnoDB; +-- source extra/rpl_tests/rpl_log.test + diff --git a/mysql-test/t/rpl_row_sp001.test b/mysql-test/t/rpl_row_sp001.test index f6ac18dc78b..6a38feb0999 100644 --- a/mysql-test/t/rpl_row_sp001.test +++ b/mysql-test/t/rpl_row_sp001.test @@ -85,34 +85,34 @@ delimiter ;// INSERT INTO test.t2 VALUES(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'); -select * from test.t2; +SELECT * FROM t2 ORDER BY a; save_master_pos; connection slave; sync_with_master; -select * from test.t2; +SELECT * FROM t2 ORDER BY a; connection master; call test.p2(1); -select * from test.t2; +SELECT * FROM t2 ORDER BY a; sync_slave_with_master; -select * from test.t2; +SELECT * FROM t2 ORDER BY a; connection master; call test.p2(2); -select * from test.t2; +SELECT * FROM t2 ORDER BY a; save_master_pos; connection slave; sync_with_master; -select * from test.t2; +SELECT * FROM t2 ORDER BY a; connection master; call test.p2(3); -select * from test.t2; +SELECT * FROM t2 ORDER BY a; save_master_pos; connection slave; sync_with_master; -select * from test.t2; +SELECT * FROM t2 ORDER BY a; ##Used for debugging #show binlog events;