Commit 23b68e3a authored by jmiller@mysql.com's avatar jmiller@mysql.com

More test case updates for using RPL with NDB as default engine

parent 726076b8
...@@ -30,21 +30,25 @@ let $VERSION=`select version()`; ...@@ -30,21 +30,25 @@ let $VERSION=`select version()`;
connection master; connection master;
reset 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); insert into t1 values (NULL);
drop table t1; 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; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines;
select count(*) from t1; select count(*) from t1;
drop table t1; drop table t1;
--replace_result $VERSION VERSION --replace_result $VERSION VERSION
--replace_column 2 # 5 # --replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
show binlog events; show binlog events;
--replace_column 2 # 5 # --replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
show binlog events from 102 limit 1; show binlog events from 102 limit 1;
--replace_column 2 # 5 # --replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
show binlog events from 102 limit 2; show binlog events from 102 limit 2;
--replace_column 2 # 5 # --replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
show binlog events from 102 limit 2,1; show binlog events from 102 limit 2,1;
flush logs; flush logs;
...@@ -64,7 +68,7 @@ flush logs; ...@@ -64,7 +68,7 @@ flush logs;
# To make it predictable, we do a useless update now, but which has the # To make it predictable, we do a useless update now, but which has the
# interest of making the slave catch both rotate events. # 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; drop table t5;
# Sync slave and force it to start on another binary log # Sync slave and force it to start on another binary log
...@@ -82,14 +86,16 @@ connection master; ...@@ -82,14 +86,16 @@ connection master;
# Create some entries for second log # 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); insert into t1 values (1);
drop table t1; drop table t1;
--replace_result $VERSION VERSION --replace_result $VERSION VERSION
--replace_column 2 # 5 # --replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
show binlog events; show binlog events;
--replace_result $VERSION VERSION --replace_result $VERSION VERSION
--replace_column 2 # 5 # --replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
show binlog events in 'master-bin.000002'; show binlog events in 'master-bin.000002';
show binary logs; show binary logs;
save_master_pos; save_master_pos;
...@@ -99,9 +105,11 @@ sync_with_master; ...@@ -99,9 +105,11 @@ sync_with_master;
show binary logs; show binary logs;
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION --replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
--replace_column 2 # 5 # --replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
show binlog events in 'slave-bin.000001' from 4; show binlog events in 'slave-bin.000001' from 4;
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION --replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
--replace_column 2 # 5 # --replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
show binlog events in 'slave-bin.000002' from 4; show binlog events in 'slave-bin.000002' from 4;
--replace_result $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 8 # 9 # 16 # 23 # 33 # --replace_column 1 # 8 # 9 # 16 # 23 # 33 #
......
...@@ -61,16 +61,14 @@ mysql ...@@ -61,16 +61,14 @@ mysql
mysqltest_prometheus mysqltest_prometheus
mysqltest_sisyfos mysqltest_sisyfos
test test
SHOW CREATE TABLE mysqltest_prometheus.t1; USE mysqltest_prometheus;
Table Create Table SHOW TABLES;
t1 CREATE TABLE `t1` ( Tables_in_mysqltest_prometheus
`a` int(11) default NULL t1
) ENGINE=MyISAM DEFAULT CHARSET=latin1 USE mysqltest_sisyfos;
SHOW CREATE TABLE mysqltest_sisyfos.t2; SHOW TABLES;
Table Create Table Tables_in_mysqltest_sisyfos
t2 CREATE TABLE `t2` ( t2
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP DATABASE IF EXISTS mysqltest_prometheus; DROP DATABASE IF EXISTS mysqltest_prometheus;
DROP DATABASE IF EXISTS mysqltest_sisyfos; DROP DATABASE IF EXISTS mysqltest_sisyfos;
DROP DATABASE IF EXISTS mysqltest_bob; DROP DATABASE IF EXISTS mysqltest_bob;
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;
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
...@@ -12,26 +12,26 @@ Server_id Host Port Rpl_recovery_rank Master_id ...@@ -12,26 +12,26 @@ Server_id Host Port Rpl_recovery_rank Master_id
create table t1 ( n int); create table t1 ( n int);
insert into t1 values (1),(2),(3),(4); insert into t1 values (1),(2),(3),(4);
insert into t1 values(5); insert into t1 values(5);
select * from t1; SELECT * FROM t1 ORDER BY n;
n n
1 1
2 2
3 3
4 4
5 5
select * from t1; SELECT * FROM t1 ORDER BY n;
n n
1 1
2 2
3 3
4 4
select * from t1; SELECT * FROM t1 ORDER BY n;
n n
1 1
2 2
3 3
4 4
select * from t1; SELECT * FROM t1 ORDER BY n;
n n
1 1
2 2
......
...@@ -16,7 +16,7 @@ insert into t1 values(15),(16),(17); ...@@ -16,7 +16,7 @@ insert into t1 values(15),(16),(17);
update t1 set m=20 where m=16; update t1 set m=20 where m=16;
delete from t1 where m=17; delete from t1 where m=17;
create table t11 select * from t1; create table t11 select * from t1;
select * from t1; select * from t1 ORDER BY m;
m m
15 15
20 20
......
...@@ -8,10 +8,10 @@ stop slave; ...@@ -8,10 +8,10 @@ stop slave;
reset master; reset master;
reset slave; reset slave;
reset master; 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); insert into t1 values (NULL);
drop table t1; 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; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines;
select count(*) from t1; select count(*) from t1;
count(*) count(*)
...@@ -20,41 +20,41 @@ drop table t1; ...@@ -20,41 +20,41 @@ drop table t1;
show binlog events; show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info 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 # 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 # Table_map 1 # test.t1
master-bin.000001 # Write_rows 1 # master-bin.000001 # Write_rows 1 #
master-bin.000001 # Query 1 # use `test`; drop table t1 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 # Table_map 1 # test.t1
master-bin.000001 # Write_rows 1 # master-bin.000001 # Write_rows 1 #
master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; drop table t1
show binlog events from 102 limit 1; show binlog events from 102 limit 1;
Log_name Pos Event_type Server_id End_log_pos Info 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; show binlog events from 102 limit 2;
Log_name Pos Event_type Server_id End_log_pos Info 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 master-bin.000001 # Table_map 1 # test.t1
show binlog events from 102 limit 2,1; show binlog events from 102 limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Write_rows 1 # master-bin.000001 # Write_rows 1 #
flush logs; flush logs;
create table t5 (a int); create table t5 (a int)ENGINE=MyISAM;
drop table t5; drop table t5;
start slave; start slave;
flush logs; flush logs;
stop slave; stop slave;
create table t1 (n int); create table t1 (n int)ENGINE=MyISAM;
insert into t1 values (1); insert into t1 values (1);
drop table t1; drop table t1;
show binlog events; show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info 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 # 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 # Table_map 1 # test.t1
master-bin.000001 # Write_rows 1 # master-bin.000001 # Write_rows 1 #
master-bin.000001 # Query 1 # use `test`; drop table t1 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 # Table_map 1 # test.t1
master-bin.000001 # Write_rows 1 # master-bin.000001 # Write_rows 1 #
master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; drop table t1
...@@ -62,44 +62,44 @@ master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 ...@@ -62,44 +62,44 @@ master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
show binlog events in 'master-bin.000002'; show binlog events in 'master-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info 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 # 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`; 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 # Table_map 1 # test.t1
master-bin.000002 # Write_rows 1 # master-bin.000002 # Write_rows 1 #
master-bin.000002 # Query 1 # use `test`; drop table t1 master-bin.000002 # Query 1 # use `test`; drop table t1
show binary logs; show binary logs;
Log_name File_size Log_name File_size
master-bin.000001 1306 master-bin.000001 1332
master-bin.000002 499 master-bin.000002 525
start slave; start slave;
show binary logs; show binary logs;
Log_name File_size Log_name File_size
slave-bin.000001 1467 slave-bin.000001 1506
slave-bin.000002 337 slave-bin.000002 350
show binlog events in 'slave-bin.000001' from 4; show binlog events in 'slave-bin.000001' from 4;
Log_name Pos Event_type Server_id End_log_pos Info 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 # 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 # Table_map 1 # test.t1
slave-bin.000001 # Write_rows 1 # slave-bin.000001 # Write_rows 1 #
slave-bin.000001 # Query 1 # use `test`; drop table t1 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 # Table_map 1 # test.t1
slave-bin.000001 # Write_rows 1 # slave-bin.000001 # Write_rows 1 #
slave-bin.000001 # Query 1 # use `test`; drop table t1 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 # Query 1 # use `test`; drop table t5
slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
show binlog events in 'slave-bin.000002' from 4; show binlog events in 'slave-bin.000002' from 4;
Log_name Pos Event_type Server_id End_log_pos Info 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 # 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 # Table_map 1 # test.t1
slave-bin.000002 # Write_rows 1 # slave-bin.000002 # Write_rows 1 #
slave-bin.000002 # Query 1 # use `test`; drop table t1 slave-bin.000002 # Query 1 # use `test`; drop table t1
show slave status; 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 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; show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
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
...@@ -28,52 +28,52 @@ UPDATE test.t2 set t ='NONE'; ...@@ -28,52 +28,52 @@ UPDATE test.t2 set t ='NONE';
END CASE; END CASE;
end// end//
INSERT INTO test.t2 VALUES(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'); 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 a t
1 NEW 1 NEW
2 NEW 2 NEW
3 NEW 3 NEW
4 NEW 4 NEW
select * from test.t2; SELECT * FROM t2 ORDER BY a;
a t a t
1 NEW 1 NEW
2 NEW 2 NEW
3 NEW 3 NEW
4 NEW 4 NEW
call test.p2(1); call test.p2(1);
select * from test.t2; SELECT * FROM t2 ORDER BY a;
a t a t
1 Tex 1 Tex
2 Tex 2 Tex
3 Tex 3 Tex
4 Tex 4 Tex
select * from test.t2; SELECT * FROM t2 ORDER BY a;
a t a t
1 Tex 1 Tex
2 Tex 2 Tex
3 Tex 3 Tex
4 Tex 4 Tex
call test.p2(2); call test.p2(2);
select * from test.t2; SELECT * FROM t2 ORDER BY a;
a t a t
1 SQL 1 SQL
2 SQL 2 SQL
3 SQL 3 SQL
4 SQL 4 SQL
select * from test.t2; SELECT * FROM t2 ORDER BY a;
a t a t
1 SQL 1 SQL
2 SQL 2 SQL
3 SQL 3 SQL
4 SQL 4 SQL
call test.p2(3); call test.p2(3);
select * from test.t2; SELECT * FROM t2 ORDER BY a;
a t a t
1 NONE 1 NONE
2 NONE 2 NONE
3 NONE 3 NONE
4 NONE 4 NONE
select * from test.t2; SELECT * FROM t2 ORDER BY a;
a t a t
1 NONE 1 NONE
2 NONE 2 NONE
......
...@@ -32,3 +32,4 @@ ndb_gis : garbled msgs from corrupt THD* ...@@ -32,3 +32,4 @@ ndb_gis : garbled msgs from corrupt THD*
rpl_ndb_auto_inc : MySQL Bugs:17086 rpl_ndb_auto_inc : MySQL Bugs:17086
rpl_ndb_relay_space : Results are not deterministic rpl_ndb_relay_space : Results are not deterministic
ndb_binlog_ddl_multi : Bug #17038 ndb_binlog_ddl_multi : Bug #17038
rpl_ndb_log : MySQL Bugs: #17158
...@@ -58,8 +58,10 @@ let $VERSION=`select version()`; ...@@ -58,8 +58,10 @@ let $VERSION=`select version()`;
SHOW DATABASES; SHOW DATABASES;
sync_slave_with_master; sync_slave_with_master;
SHOW DATABASES; SHOW DATABASES;
SHOW CREATE TABLE mysqltest_prometheus.t1; USE mysqltest_prometheus;
SHOW CREATE TABLE mysqltest_sisyfos.t2; SHOW TABLES;
USE mysqltest_sisyfos;
SHOW TABLES;
connection master; connection master;
DROP DATABASE IF EXISTS mysqltest_prometheus; DROP DATABASE IF EXISTS mysqltest_prometheus;
......
###################################
# 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
###################################
# 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
...@@ -32,12 +32,12 @@ insert into t1 values(5); ...@@ -32,12 +32,12 @@ insert into t1 values(5);
connection master; connection master;
enable_rpl_parse; enable_rpl_parse;
# The first of the queries will be sent to the slave, the second to the master. # The first of the queries will be sent to the slave, the second to the master.
select * from t1; SELECT * FROM t1 ORDER BY n;
select * from t1; SELECT * FROM t1 ORDER BY n;
disable_rpl_parse; disable_rpl_parse;
select * from t1; SELECT * FROM t1 ORDER BY n;
connection slave; connection slave;
select * from t1; SELECT * FROM t1 ORDER BY n;
drop table t1; drop table t1;
connection master; connection master;
drop table t1; drop table t1;
......
...@@ -21,7 +21,7 @@ create table t11 select * from t1; ...@@ -21,7 +21,7 @@ create table t11 select * from t1;
save_master_pos; save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;
select * from t1; select * from t1 ORDER BY m;
select * from t2; select * from t2;
--error 1146 --error 1146
select * from t11; select * from t11;
......
# 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 -- source include/have_binlog_format_row.inc
let $engine_type=MyISAM;
-- source extra/rpl_tests/rpl_log.test -- source extra/rpl_tests/rpl_log.test
###################################
# 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
...@@ -85,34 +85,34 @@ delimiter ;// ...@@ -85,34 +85,34 @@ delimiter ;//
INSERT INTO test.t2 VALUES(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'); 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; save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;
select * from test.t2; SELECT * FROM t2 ORDER BY a;
connection master; connection master;
call test.p2(1); call test.p2(1);
select * from test.t2; SELECT * FROM t2 ORDER BY a;
sync_slave_with_master; sync_slave_with_master;
select * from test.t2; SELECT * FROM t2 ORDER BY a;
connection master; connection master;
call test.p2(2); call test.p2(2);
select * from test.t2; SELECT * FROM t2 ORDER BY a;
save_master_pos; save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;
select * from test.t2; SELECT * FROM t2 ORDER BY a;
connection master; connection master;
call test.p2(3); call test.p2(3);
select * from test.t2; SELECT * FROM t2 ORDER BY a;
save_master_pos; save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;
select * from test.t2; SELECT * FROM t2 ORDER BY a;
##Used for debugging ##Used for debugging
#show binlog events; #show binlog events;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment