Commit 32e3f461 authored by unknown's avatar unknown
Browse files

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
parent 719762db
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -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 #
+8 −10
Original line number Diff line number Diff line
@@ -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;
+29 −0
Original line number Diff line number Diff line
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;
+139 −0
Original line number Diff line number Diff line
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
+4 −4
Original line number Diff line number Diff line
@@ -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
Loading