summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/r
diff options
context:
space:
mode:
authorGuilhem Bichot <guilhem@mysql.com>2009-02-12 15:08:56 +0100
committerGuilhem Bichot <guilhem@mysql.com>2009-02-12 15:08:56 +0100
commit704b4845aa9ce51a6c5a9f5f42265e376db0dfb3 (patch)
tree73476f970c229f75846855edeeddfbc6fd87ed4b /mysql-test/suite/rpl/r
parent2637dda66845868fe996e60e54996acf03f6c537 (diff)
parenta5e5b0180a6b86cce258eef232ef59d6e7c40bb0 (diff)
downloadmariadb-git-704b4845aa9ce51a6c5a9f5f42265e376db0dfb3.tar.gz
merge of 5.1-main into 5.1-maria. Myisam->Maria change propagation will follow.
There were so many changes into mtr (this is the new mtr coming) that I rather copied mtr from 6.0-main here (at least this one knows how to run Maria tests). I also fixed suite/maria tests to be accepted by the new mtr. mysys/thr_mutex.c: adding DBUG_PRINT here, so that we can locate where the warning is issued.
Diffstat (limited to 'mysql-test/suite/rpl/r')
-rw-r--r--mysql-test/suite/rpl/r/rpl_LD_INFILE.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_alter_db.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_auto_increment.result17
-rw-r--r--mysql-test/suite/rpl/r/rpl_binlog_corruption.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_blackhole.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_bug26395.result41
-rw-r--r--mysql-test/suite/rpl/r/rpl_bug33931.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result298
-rw-r--r--mysql-test/suite/rpl/r/rpl_cross_version.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_drop_db.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_drop_view.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_events.result20
-rw-r--r--mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result32
-rw-r--r--mysql-test/suite/rpl/r/rpl_flushlog_loop.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_found_rows.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_idempotency.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_ignore_table.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_init_slave.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_bug30919.result1043
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_load_table_from_master.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_loaddata.result21
-rw-r--r--mysql-test/suite/rpl/r/rpl_loaddata_charset.result14
-rw-r--r--mysql-test/suite/rpl/r/rpl_loaddata_fatal.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_loaddata_m.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_loaddata_s.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_loaddata_simple.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_loaddatalocal.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_loadfile.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_log_pos.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_misc_functions.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_multi_engine.result22
-rw-r--r--mysql-test/suite/rpl/r/rpl_packet.result55
-rw-r--r--mysql-test/suite/rpl/r/rpl_ps.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_replicate_do.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_rewrt_db.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_001.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_conflicts.result109
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_create_table.result97
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result68
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_loaddata_m.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_log.result32
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_log_innodb.result32
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_max_relay_size.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_mystery22.result32
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_until.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_server_id1.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_server_id2.result51
-rw-r--r--mysql-test/suite/rpl/r/rpl_slave_grp_exec.result123
-rw-r--r--mysql-test/suite/rpl/r/rpl_slave_skip.result23
-rw-r--r--mysql-test/suite/rpl/r/rpl_slave_status.result27
-rw-r--r--mysql-test/suite/rpl/r/rpl_sp.result16
-rw-r--r--mysql-test/suite/rpl/r/rpl_sp_effects.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_000001.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_EE_err2.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_conflicts.result54
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_log.result36
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_mystery22.result31
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_until.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporary.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporary_errors.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_timezone.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_trigger.result22
-rw-r--r--mysql-test/suite/rpl/r/rpl_truncate_2myisam.result24
-rw-r--r--mysql-test/suite/rpl/r/rpl_truncate_3innodb.result24
-rw-r--r--mysql-test/suite/rpl/r/rpl_variables.result4
79 files changed, 1104 insertions, 1498 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_LD_INFILE.result b/mysql-test/suite/rpl/r/rpl_LD_INFILE.result
index 70013f95d85..b092dd9e088 100644
--- a/mysql-test/suite/rpl/r/rpl_LD_INFILE.result
+++ b/mysql-test/suite/rpl/r/rpl_LD_INFILE.result
@@ -6,10 +6,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
DROP TABLE IF EXISTS test.t1;
CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a));
-LOAD DATA INFILE '../std_data_ln/words2.dat' INTO TABLE test.t1;
+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_ln/words2.dat' INTO TABLE test.t1;
+LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1;
SELECT * FROM test.t1 ORDER BY a DESC;
a
aberration
diff --git a/mysql-test/suite/rpl/r/rpl_alter_db.result b/mysql-test/suite/rpl/r/rpl_alter_db.result
index 6edbe5d427f..60c07d0dede 100644
--- a/mysql-test/suite/rpl/r/rpl_alter_db.result
+++ b/mysql-test/suite/rpl/r/rpl_alter_db.result
@@ -4,5 +4,9 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-use mysql;
+==== Verify that alter database does not stop replication ====
+create database temp_db;
+use temp_db;
alter database collate latin1_bin;
+==== Clean up ====
+drop database temp_db;
diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result
index 083f3a4e901..2a4c3a09361 100644
--- a/mysql-test/suite/rpl/r/rpl_auto_increment.result
+++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result
@@ -227,3 +227,20 @@ select * from t3 order by a;
a
127
drop table t1,t2,t3;
+set auto_increment_increment=1;
+set auto_increment_offset=1;
+CREATE TABLE t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb;
+INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
+drop table t1;
diff --git a/mysql-test/suite/rpl/r/rpl_binlog_corruption.result b/mysql-test/suite/rpl/r/rpl_binlog_corruption.result
new file mode 100644
index 00000000000..f94d2833603
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_binlog_corruption.result
@@ -0,0 +1,8 @@
+call mtr.add_suppression('Found invalid event in binary log');
+==== Initialize ====
+Setting up fake replication from MYSQL_TEST_DIR/std_data/bug40482-bin.000001
+==== Test ====
+START SLAVE SQL_THREAD;
+Last_SQL_Error = Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
+==== Clean up ====
+Cleaning up after setup_fake_relay_log.inc
diff --git a/mysql-test/suite/rpl/r/rpl_blackhole.result b/mysql-test/suite/rpl/r/rpl_blackhole.result
index 27094e761b0..954589267c5 100644
--- a/mysql-test/suite/rpl/r/rpl_blackhole.result
+++ b/mysql-test/suite/rpl/r/rpl_blackhole.result
@@ -98,3 +98,4 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
>>> Something was written to binary log <<<
+DROP TABLE t1,t2;
diff --git a/mysql-test/suite/rpl/r/rpl_bug26395.result b/mysql-test/suite/rpl/r/rpl_bug26395.result
new file mode 100644
index 00000000000..c6dd2d01ed3
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_bug26395.result
@@ -0,0 +1,41 @@
+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;
+==== Initialize ====
+[on master]
+CREATE TABLE tinnodb (a INT) ENGINE = INNODB;
+SHOW CREATE TABLE tinnodb;
+Table Create Table
+tinnodb CREATE TABLE `tinnodb` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+set @old_debug= @@debug;
+set @@debug= 'd,do_not_write_xid';
+==== Test ====
+INSERT INTO tinnodb VALUES (1);
+SELECT * FROM tinnodb ORDER BY a;
+a
+1
+[on slave]
+==== Verify results on slave ====
+include/stop_slave.inc
+SELECT "" AS Slave_IO_State;
+Slave_IO_State
+
+SELECT "" AS Last_SQL_Error;
+Last_SQL_Error
+
+SELECT "" AS Last_IO_Error;
+Last_IO_Error
+
+SELECT * FROM tinnodb ORDER BY a;
+a
+==== Clean up ====
+[on master]
+DROP TABLE tinnodb;
+set @@debug= @old_debug;
+[on slave]
+DROP TABLE tinnodb;
diff --git a/mysql-test/suite/rpl/r/rpl_bug33931.result b/mysql-test/suite/rpl/r/rpl_bug33931.result
index 4043f04215b..1b3f2cfc7dc 100644
--- a/mysql-test/suite/rpl/r/rpl_bug33931.result
+++ b/mysql-test/suite/rpl/r/rpl_bug33931.result
@@ -1,6 +1,8 @@
reset master;
+call mtr.add_suppression("Failed during slave.*thread initialization");
stop slave;
reset slave;
+SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
start slave;
show slave status;
Slave_IO_State #
@@ -41,3 +43,4 @@ Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
+SET GLOBAL debug="";
diff --git a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
new file mode 100644
index 00000000000..c3ccc76d1bc
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
@@ -0,0 +1,298 @@
+*** Set up circular ring by schema A->B->C->D->A ***
+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 SLAVE;
+RESET MASTER;
+STOP SLAVE;
+RESET SLAVE;
+SET auto_increment_increment = 4;
+SET auto_increment_offset = 1;
+RESET MASTER;
+RESET SLAVE;
+CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_A_PORT,master_user='root',MASTER_LOG_FILE='MASTER_A_LOG_FILE';
+SET auto_increment_increment = 4;
+SET auto_increment_offset = 2;
+RESET MASTER;
+STOP SLAVE;
+RESET SLAVE;
+CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_B_PORT,master_user='root',MASTER_LOG_FILE='MASTER_B_LOG_FILE';
+SET auto_increment_increment = 4;
+SET auto_increment_offset = 3;
+RESET MASTER;
+STOP SLAVE;
+RESET SLAVE;
+CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_C_PORT,master_user='root',MASTER_LOG_FILE='MASTER_C_LOG_FILE';
+SET auto_increment_increment = 4;
+SET auto_increment_offset = 4;
+CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_D_PORT,master_user='root',MASTER_LOG_FILE='MASTER_D_LOG_FILE';
+SHOW VARIABLES LIKE 'auto_increment_%';
+Variable_name Value
+auto_increment_increment 4
+auto_increment_offset 1
+SHOW VARIABLES LIKE 'auto_increment_%';
+Variable_name Value
+auto_increment_increment 4
+auto_increment_offset 2
+SHOW VARIABLES LIKE 'auto_increment_%';
+Variable_name Value
+auto_increment_increment 4
+auto_increment_offset 3
+SHOW VARIABLES LIKE 'auto_increment_%';
+Variable_name Value
+auto_increment_increment 4
+auto_increment_offset 4
+1
+START SLAVE;
+START SLAVE;
+START SLAVE;
+START SLAVE;
+
+*** Preparing data ***
+CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM;
+CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB;
+
+*** Testing schema A->B->C->D->A ***
+
+INSERT INTO t1(b,c) VALUES('A',1);
+INSERT INTO t1(b,c) VALUES('B',1);
+INSERT INTO t1(b,c) VALUES('C',1);
+INSERT INTO t1(b,c) VALUES('D',1);
+SELECT 'Master A',a,b FROM t1 WHERE c = 1 ORDER BY a,b;
+Master A a b
+Master A 1 A
+Master A 2 B
+Master A 3 C
+Master A 4 D
+SELECT 'Master B',a,b FROM t1 WHERE c = 1 ORDER BY a,b;
+Master B a b
+Master B 1 A
+Master B 2 B
+Master B 3 C
+Master B 4 D
+SELECT 'Master C',a,b FROM t1 WHERE c = 1 ORDER BY a,b;
+Master C a b
+Master C 1 A
+Master C 2 B
+Master C 3 C
+Master C 4 D
+SELECT 'Master D',a,b FROM t1 WHERE c = 1 ORDER BY a,b;
+Master D a b
+Master D 1 A
+Master D 2 B
+Master D 3 C
+Master D 4 D
+
+*** Testing schema A->B->D->A if C has failure ***
+
+* Do failure for C and then make new connection B->D *
+STOP SLAVE;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
+include/start_slave.inc
+INSERT INTO t1 VALUES(6,'C',2);
+INSERT INTO t1(b,c) VALUES('B',2);
+INSERT INTO t1(b,c) VALUES('A',2);
+INSERT INTO t1(b,c) VALUES('D',2);
+
+* Data on servers (C failed) *
+SELECT 'Master A',a,b FROM t1 WHERE c = 2 ORDER BY a,b;
+Master A a b
+Master A 5 A
+Master A 8 D
+SELECT 'Master B',a,b FROM t1 WHERE c = 2 ORDER BY a,b;
+Master B a b
+Master B 5 A
+Master B 6 B
+Master B 8 D
+SELECT 'Master C',a,b FROM t1 WHERE c = 2 ORDER BY a,b;
+Master C a b
+Master C 6 C
+SELECT 'Master D',a,b FROM t1 WHERE c = 2 ORDER BY a,b;
+Master D a b
+Master D 8 D
+
+* Reconfigure replication to schema A->B->D->A *
+STOP SLAVE;
+STOP SLAVE;
+CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_B_PORT,master_user='root',master_log_file='LOG_FILE',master_log_pos=LOG_POS;
+include/start_slave.inc
+
+* Check data inserted before failure *
+SELECT 'Master A',a,b FROM t1 WHERE c = 2 ORDER BY a,b;
+Master A a b
+Master A 5 A
+Master A 6 B
+Master A 8 D
+SELECT 'Master B',a,b FROM t1 WHERE c = 2 ORDER BY a,b;
+Master B a b
+Master B 5 A
+Master B 6 B
+Master B 8 D
+SELECT 'Master C',a,b FROM t1 WHERE c = 2 ORDER BY a,b;
+Master C a b
+Master C 6 C
+SELECT 'Master D',a,b FROM t1 WHERE c = 2 ORDER BY a,b;
+Master D a b
+Master D 5 A
+Master D 6 B
+Master D 8 D
+
+* Check data inserted after failure *
+INSERT INTO t1(b,c) VALUES('A',3);
+INSERT INTO t1(b,c) VALUES('B',3);
+INSERT INTO t1(b,c) VALUES('D',3);
+SELECT 'Master A',a,b FROM t1 WHERE c = 3 ORDER BY a,b;
+Master A a b
+Master A 9 A
+Master A 10 B
+Master A 12 D
+SELECT 'Master B',a,b FROM t1 WHERE c = 3 ORDER BY a,b;
+Master B a b
+Master B 9 A
+Master B 10 B
+Master B 12 D
+SELECT 'Master C',a,b FROM t1 WHERE c = 3 ORDER BY a,b;
+Master C a b
+SELECT 'Master D',a,b FROM t1 WHERE c = 3 ORDER BY a,b;
+Master D a b
+Master D 9 A
+Master D 10 B
+Master D 12 D
+
+*** Testing restoring scheme A->B->C->D->A after failure ***
+
+* Remove wrong event from C and restore B->C->D *
+include/stop_slave.inc
+DELETE FROM t1 WHERE a = 6;
+START SLAVE;
+RESET MASTER;
+RESET SLAVE;
+CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_C_PORT,master_user='root',master_log_file='LOG_FILE',master_log_pos=LOG_POS;
+START SLAVE;
+
+* Check data inserted before restoring schema A->B->C->D->A *
+SELECT 'Master A',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b;
+Master A a b
+Master A 5 A
+Master A 6 B
+Master A 8 D
+Master A 9 A
+Master A 10 B
+Master A 12 D
+SELECT 'Master B',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b;
+Master B a b
+Master B 5 A
+Master B 6 B
+Master B 8 D
+Master B 9 A
+Master B 10 B
+Master B 12 D
+SELECT 'Master C',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b;
+Master C a b
+Master C 5 A
+Master C 6 B
+Master C 8 D
+Master C 9 A
+Master C 10 B
+Master C 12 D
+SELECT 'Master D',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b;
+Master D a b
+Master D 5 A
+Master D 6 B
+Master D 8 D
+Master D 9 A
+Master D 10 B
+Master D 12 D
+
+* Check data inserted after restoring schema A->B->C->D->A *
+INSERT INTO t1(b,c) VALUES('A',4);
+INSERT INTO t1(b,c) VALUES('B',4);
+INSERT INTO t1(b,c) VALUES('C',4);
+INSERT INTO t1(b,c) VALUES('D',4);
+SELECT 'Master A',a,b FROM t1 WHERE c = 4 ORDER BY a,b;
+Master A a b
+Master A 13 A
+Master A 14 B
+Master A 15 C
+Master A 16 D
+SELECT 'Master B',a,b FROM t1 WHERE c = 4 ORDER BY a,b;
+Master B a b
+Master B 13 A
+Master B 14 B
+Master B 15 C
+Master B 16 D
+SELECT 'Master C',a,b FROM t1 WHERE c = 4 ORDER BY a,b;
+Master C a b
+Master C 13 A
+Master C 14 B
+Master C 15 C
+Master C 16 D
+SELECT 'Master D',a,b FROM t1 WHERE c = 4 ORDER BY a,b;
+Master D a b
+Master D 13 A
+Master D 14 B
+Master D 15 C
+Master D 16 D
+
+* Transactions with commits *
+BEGIN;
+BEGIN;
+SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b;
+Master A b COUNT(*)
+Master A A 100
+Master A B 100
+Master A C 100
+Master A D 100
+SELECT 'Master B',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b;
+Master B b COUNT(*)
+Master B A 100
+Master B B 100
+Master B C 100
+Master B D 100
+SELECT 'Master C',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b;
+Master C b COUNT(*)
+Master C A 100
+Master C B 100
+Master C C 100
+Master C D 100
+SELECT 'Master D',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b;
+Master D b COUNT(*)
+Master D A 100
+Master D B 100
+Master D C 100
+Master D D 100
+
+* Transactions with rollbacks *
+BEGIN;
+BEGIN;
+SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b;
+Master A b COUNT(*)
+Master A B 100
+Master A D 100
+SELECT 'Master B',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b;
+Master B b COUNT(*)
+Master B B 100
+Master B D 100
+SELECT 'Master C',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b;
+Master C b COUNT(*)
+Master C B 100
+Master C D 100
+SELECT 'Master D',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b;
+Master D b COUNT(*)
+Master D B 100
+Master D D 100
+
+*** Clean up ***
+DROP TABLE t1,t2;
+STOP SLAVE;
+RESET SLAVE;
+STOP SLAVE;
+RESET SLAVE;
+STOP SLAVE;
+RESET SLAVE;
+STOP SLAVE;
+RESET SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_cross_version.result b/mysql-test/suite/rpl/r/rpl_cross_version.result
new file mode 100644
index 00000000000..de5dd134516
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_cross_version.result
@@ -0,0 +1,12 @@
+==== Initialize ====
+Setting up fake replication from MYSQL_TEST_DIR/suite/binlog/std_data/binlog_old_version_4_1.000001
+==== Test ====
+start slave sql_thread;
+==== a prove that the fake has been processed successfully ====
+SELECT COUNT(*) - 17920 as zero FROM t3;
+zero
+0
+==== Clean up ====
+stop slave sql_thread;
+Cleaning up after setup_fake_relay_log.inc
+drop table t1, t3;
diff --git a/mysql-test/suite/rpl/r/rpl_drop_db.result b/mysql-test/suite/rpl/r/rpl_drop_db.result
index c0efdf5290d..8825797f80d 100644
--- a/mysql-test/suite/rpl/r/rpl_drop_db.result
+++ b/mysql-test/suite/rpl/r/rpl_drop_db.result
@@ -31,8 +31,7 @@ use test;
select * from t1;
n
1234
-stop slave;
-drop database mysqltest1;
-drop database mysqltest1;
use test;
drop table t1;
+drop database mysqltest1;
+include/stop_slave.inc
diff --git a/mysql-test/suite/rpl/r/rpl_drop_view.result b/mysql-test/suite/rpl/r/rpl_drop_view.result
index ef625464881..c359011612a 100644
--- a/mysql-test/suite/rpl/r/rpl_drop_view.result
+++ b/mysql-test/suite/rpl/r/rpl_drop_view.result
@@ -25,3 +25,5 @@ select * from v2;
ERROR 42S02: Table 'test.v2' doesn't exist
select * from v3;
ERROR 42S02: Table 'test.v3' doesn't exist
+==== clean up ====
+drop table t1, t2, t3;
diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result
index e4a412cb1d5..b797183f9d2 100644
--- a/mysql-test/suite/rpl/r/rpl_events.result
+++ b/mysql-test/suite/rpl/r/rpl_events.result
@@ -1,10 +1,11 @@
-set global event_scheduler=1;
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 @old_event_scheduler = @@global.event_scheduler;
+set global event_scheduler=1;
set binlog_format=row;
DROP EVENT IF EXISTS test.justonce;
drop table if exists t1,t2;
@@ -34,7 +35,7 @@ db name status originator
test justonce SLAVESIDE_DISABLED 1
"Dropping event test.slave_once on the slave"
DROP EVENT IF EXISTS test.slave_once;
-CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE DO
+CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO
INSERT IGNORE INTO t1(id, c) VALUES (3, 'from slave_once');
"Checking event status on the slave for originator value = slave's server_id"
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once';
@@ -45,7 +46,7 @@ DROP EVENT IF EXISTS test.slave_once;
"Dropping event test.justonce on the master"
DROP EVENT IF EXISTS test.justonce;
"Creating event test.er on the master"
-CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND DO
+CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO
INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er');
"Checking event status on the master"
SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
@@ -56,7 +57,7 @@ SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND
db name status originator body
test er SLAVESIDE_DISABLED 1 INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er')
"Altering event test.er on the master"
-ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND DO
+ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO
INSERT IGNORE INTO t1(id, c) VALUES (5, 'from alter er');
"Checking event status on the master"
SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
@@ -75,7 +76,7 @@ db name status originator
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
db name status originator
"Creating event test.slave_terminate on the slave"
-CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND DO
+CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO
INSERT IGNORE INTO t1(id, c) VALUES (6, 'from slave_terminate');
"Checking event status on the slave"
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
@@ -123,7 +124,7 @@ db name status originator
test justonce SLAVESIDE_DISABLED 1
"Dropping event test.slave_once on the slave"
DROP EVENT IF EXISTS test.slave_once;
-CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE DO
+CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO
INSERT IGNORE INTO t1(id, c) VALUES (3, 'from slave_once');
"Checking event status on the slave for originator value = slave's server_id"
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once';
@@ -134,7 +135,7 @@ DROP EVENT IF EXISTS test.slave_once;
"Dropping event test.justonce on the master"
DROP EVENT IF EXISTS test.justonce;
"Creating event test.er on the master"
-CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND DO
+CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO
INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er');
"Checking event status on the master"
SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
@@ -145,7 +146,7 @@ SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND
db name status originator body
test er SLAVESIDE_DISABLED 1 INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er')
"Altering event test.er on the master"
-ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND DO
+ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO
INSERT IGNORE INTO t1(id, c) VALUES (5, 'from alter er');
"Checking event status on the master"
SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
@@ -164,7 +165,7 @@ db name status originator
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
db name status originator
"Creating event test.slave_terminate on the slave"
-CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND DO
+CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO
INSERT IGNORE INTO t1(id, c) VALUES (6, 'from slave_terminate');
"Checking event status on the slave"
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
@@ -190,4 +191,5 @@ select * from t28953;
END;|
ALTER EVENT event1 RENAME TO event2;
DROP EVENT event2;
+SET @@global.event_scheduler= @old_event_scheduler;
DROP TABLE t28953;
diff --git a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
index fb7f29da656..7eddaabc636 100644
--- a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
+++ b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
@@ -50,82 +50,82 @@ UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1'
set global sql_slave_skip_counter=1;
-start slave;
+include/start_slave.inc
[on slave]
show tables like 't%';
Tables_in_test (t%)
diff --git a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result
index baa740bf250..600ac44fc86 100644
--- a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result
+++ b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result
@@ -6,7 +6,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
show variables like 'relay_log%';
Variable_name Value
-relay_log MYSQLTEST_VARDIR/master-data/relay-log
+relay_log MYSQLD_DATADIR/relay-log
relay_log_index
relay_log_info_file relay-log.info
relay_log_purge ON
@@ -18,11 +18,7 @@ start slave;
stop slave;
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=SLAVE_PORT;
-start slave;
-
-let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%0%0%None%' ;
-
---source include/wait_slave_status.inc
+include/start_slave.inc
FLUSH LOGS;
SHOW SLAVE STATUS;
Slave_IO_State #
diff --git a/mysql-test/suite/rpl/r/rpl_found_rows.result b/mysql-test/suite/rpl/r/rpl_found_rows.result
index 25be9eb63b3..45a931872cf 100644
--- a/mysql-test/suite/rpl/r/rpl_found_rows.result
+++ b/mysql-test/suite/rpl/r/rpl_found_rows.result
@@ -103,10 +103,10 @@ DROP PROCEDURE just_log;
DROP PROCEDURE calc_and_log;
DROP FUNCTION log_rows;
**** Resetting master and slave ****
-STOP SLAVE;
+include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
-START SLAVE;
+include/start_slave.inc
#### 2. Using mixed mode ####
==== 2.1. Checking a procedure ====
**** On Master ****
diff --git a/mysql-test/suite/rpl/r/rpl_idempotency.result b/mysql-test/suite/rpl/r/rpl_idempotency.result
index 5a4052864ad..f39d0f1f37f 100644
--- a/mysql-test/suite/rpl/r/rpl_idempotency.result
+++ b/mysql-test/suite/rpl/r/rpl_idempotency.result
@@ -4,6 +4,9 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: 1032");
+call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
+SET @old_slave_exec_mode= @@global.slave_exec_mode;
CREATE TABLE t1 (a INT PRIMARY KEY);
CREATE TABLE t2 (a INT);
INSERT INTO t1 VALUES (-1),(-2),(-3);
@@ -220,7 +223,7 @@ Last_SQL_Error
0
set global slave_exec_mode='IDEMPOTENT';
start slave sql_thread;
-set global slave_exec_mode='STRICT';
+SET @@global.slave_exec_mode= @old_slave_exec_mode;
set @@session.binlog_format= @save_binlog_format;
drop table t1,t2,ti2,ti1;
*** end of tests
diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result
index cdc3f5e9579..e77be425270 100644
--- a/mysql-test/suite/rpl/r/rpl_ignore_table.result
+++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result
@@ -116,7 +116,8 @@ show grants for mysqltest4@localhost;
Grants for mysqltest4@localhost
GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
set global slave_exec_mode='IDEMPOTENT';
-drop table t1, t4, mysqltest2.t2;
+drop table t1, mysqltest2.t2;
+drop table t4;
drop database mysqltest2;
delete from mysql.user where user like "mysqltest%";
delete from mysql.db where user like "mysqltest%";
diff --git a/mysql-test/suite/rpl/r/rpl_init_slave.result b/mysql-test/suite/rpl/r/rpl_init_slave.result
index 5ff72e57f0e..908abf56c1f 100644
--- a/mysql-test/suite/rpl/r/rpl_init_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_init_slave.result
@@ -5,8 +5,8 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
set global max_connections=151;
-stop slave;
-start slave;
+include/stop_slave.inc
+include/start_slave.inc
show variables like 'init_slave';
Variable_name Value
init_slave set global max_connections=500
@@ -25,6 +25,6 @@ set global init_connect="set @c=1";
show variables like 'init_connect';
Variable_name Value
init_connect set @c=1
-stop slave;
+include/stop_slave.inc
set global init_connect= @my_global_init_connect;
set global max_connections= default;
diff --git a/mysql-test/suite/rpl/r/rpl_innodb.result b/mysql-test/suite/rpl/r/rpl_innodb.result
index 658f92f4d75..bf6c3cb8c86 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb.result
@@ -12,7 +12,7 @@ PRIMARY KEY (id),
UNIQUE KEY unique_rec (name,number)
) ENGINE=InnoDB;
LOAD DATA
-INFILE '../std_data_ln/loaddata_pair.dat'
+INFILE '../../std_data/loaddata_pair.dat'
REPLACE INTO TABLE t4
(name,number);
SELECT * FROM t4;
@@ -24,7 +24,7 @@ id name number
1 XXX 12345
2 XXY 12345
LOAD DATA
-INFILE '../std_data_ln/loaddata_pair.dat'
+INFILE '../../std_data/loaddata_pair.dat'
REPLACE INTO TABLE t4
(name,number);
SELECT * FROM t4;
@@ -43,6 +43,7 @@ CREATE TEMPORARY TABLE mysqltest1.tmp (f1 BIGINT);
CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE="InnoDB";
SET AUTOCOMMIT = 0;
-------- switch to slave --------
+ALTER TABLE mysqltest1.t1 ENGINE = MyISAM;
SHOW CREATE TABLE mysqltest1.t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_bug30919.result b/mysql-test/suite/rpl/r/rpl_innodb_bug30919.result
deleted file mode 100644
index 42aa4ff302b..00000000000
--- a/mysql-test/suite/rpl/r/rpl_innodb_bug30919.result
+++ /dev/null
@@ -1,1043 +0,0 @@
-use test;
-CREATE TABLE test.part_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
-dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
-fkid MEDIUMINT, filler VARCHAR(255),
-PRIMARY KEY(id)) ENGINE='innodb'
-PARTITION BY RANGE(id)
-SUBPARTITION BY hash(id) subpartitions 2
-(PARTITION pa3 values less than (42),
-PARTITION pa6 values less than (60),
-PARTITION pa7 values less than (70),
-PARTITION pa8 values less than (80),
-PARTITION pa9 values less than (90),
-PARTITION pa10 values less than (100),
-PARTITION pa11 values less than MAXVALUE);
-CREATE PROCEDURE test.proc_part()
-BEGIN
-DECLARE ins_count INT DEFAULT 1000;
-DECLARE del_count INT;
-DECLARE cur_user VARCHAR(255);
-DECLARE local_uuid VARCHAR(255);
-DECLARE local_time TIMESTAMP;
-SET local_time= NOW();
-SET cur_user= CURRENT_USER();
-SET local_uuid= UUID();
-WHILE ins_count > 0 DO
-INSERT INTO test.part_tbl VALUES (NULL, NOW(), USER() , UUID(),
-ins_count,'Going to test MBR for MySQL');
-SET ins_count = ins_count - 1;
-END WHILE;
-SELECT MAX(id) FROM test.part_tbl INTO del_count;
-WHILE del_count > 0 DO
-DELETE FROM test.part_tbl WHERE id = del_count;
-select count(*) as internal_count, del_count -- these two lines are for
-FROM test.part_tbl; -- debug to show the problem
-SET del_count = del_count - 2;
-END WHILE;
-END|
-CALL test.proc_part();
-internal_count del_count
-999 1000
-internal_count del_count
-998 998
-internal_count del_count
-997 996
-internal_count del_count
-996 994
-internal_count del_count
-995 992
-internal_count del_count
-994 990
-internal_count del_count
-993 988
-internal_count del_count
-992 986
-internal_count del_count
-991 984
-internal_count del_count
-990 982
-internal_count del_count
-989 980
-internal_count del_count
-988 978
-internal_count del_count
-987 976
-internal_count del_count
-986 974
-internal_count del_count
-985 972
-internal_count del_count
-984 970
-internal_count del_count
-983 968
-internal_count del_count
-982 966
-internal_count del_count
-981 964
-internal_count del_count
-980 962
-internal_count del_count
-979 960
-internal_count del_count
-978 958
-internal_count del_count
-977 956
-internal_count del_count
-976 954
-internal_count del_count
-975 952
-internal_count del_count
-974 950
-internal_count del_count
-973 948
-internal_count del_count
-972 946
-internal_count del_count
-971 944
-internal_count del_count
-970 942
-internal_count del_count
-969 940
-internal_count del_count
-968 938
-internal_count del_count
-967 936
-internal_count del_count
-966 934
-internal_count del_count
-965 932
-internal_count del_count
-964 930
-internal_count del_count
-963 928
-internal_count del_count
-962 926
-internal_count del_count
-961 924
-internal_count del_count
-960 922
-internal_count del_count
-959 920
-internal_count del_count
-958 918
-internal_count del_count
-957 916
-internal_count del_count
-956 914
-internal_count del_count
-955 912
-internal_count del_count
-954 910
-internal_count del_count
-953 908
-internal_count del_count
-952 906
-internal_count del_count
-951 904
-internal_count del_count
-950 902
-internal_count del_count
-949 900
-internal_count del_count
-948 898
-internal_count del_count
-947 896
-internal_count del_count
-946 894
-internal_count del_count
-945 892
-internal_count del_count
-944 890
-internal_count del_count
-943 888
-internal_count del_count
-942 886
-internal_count del_count
-941 884
-internal_count del_count
-940 882
-internal_count del_count
-939 880
-internal_count del_count
-938 878
-internal_count del_count
-937 876
-internal_count del_count
-936 874
-internal_count del_count
-935 872
-internal_count del_count
-934 870
-internal_count del_count
-933 868
-internal_count del_count
-932 866
-internal_count del_count
-931 864
-internal_count del_count
-930 862
-internal_count del_count
-929 860
-internal_count del_count
-928 858
-internal_count del_count
-927 856
-internal_count del_count
-926 854
-internal_count del_count
-925 852
-internal_count del_count
-924 850
-internal_count del_count
-923 848
-internal_count del_count
-922 846
-internal_count del_count
-921 844
-internal_count del_count
-920 842
-internal_count del_count
-919 840
-internal_count del_count
-918 838
-internal_count del_count
-917 836
-internal_count del_count
-916 834
-internal_count del_count
-915 832
-internal_count del_count
-914 830
-internal_count del_count
-913 828
-internal_count del_count
-912 826
-internal_count del_count
-911 824
-internal_count del_count
-910 822
-internal_count del_count
-909 820
-internal_count del_count
-908 818
-internal_count del_count
-907 816
-internal_count del_count
-906 814
-internal_count del_count
-905 812
-internal_count del_count
-904 810
-internal_count del_count
-903 808
-internal_count del_count
-902 806
-internal_count del_count
-901 804
-internal_count del_count
-900 802
-internal_count del_count
-899 800
-internal_count del_count
-898 798
-internal_count del_count
-897 796
-internal_count del_count
-896 794
-internal_count del_count
-895 792
-internal_count del_count
-894 790
-internal_count del_count
-893 788
-internal_count del_count
-892 786
-internal_count del_count
-891 784
-internal_count del_count
-890 782
-internal_count del_count
-889 780
-internal_count del_count
-888 778
-internal_count del_count
-887 776
-internal_count del_count
-886 774
-internal_count del_count
-885 772
-internal_count del_count
-884 770
-internal_count del_count
-883 768
-internal_count del_count
-882 766
-internal_count del_count
-881 764
-internal_count del_count
-880 762
-internal_count del_count
-879 760
-internal_count del_count
-878 758
-internal_count del_count
-877 756
-internal_count del_count
-876 754
-internal_count del_count
-875 752
-internal_count del_count
-874 750
-internal_count del_count
-873 748
-internal_count del_count
-872 746
-internal_count del_count
-871 744
-internal_count del_count
-870 742
-internal_count del_count
-869 740
-internal_count del_count
-868 738
-internal_count del_count
-867 736
-internal_count del_count
-866 734
-internal_count del_count
-865 732
-internal_count del_count
-864 730
-internal_count del_count
-863 728
-internal_count del_count
-862 726
-internal_count del_count
-861 724
-internal_count del_count
-860 722
-internal_count del_count
-859 720
-internal_count del_count
-858 718
-internal_count del_count
-857 716
-internal_count del_count
-856 714
-internal_count del_count
-855 712
-internal_count del_count
-854 710
-internal_count del_count
-853 708
-internal_count del_count
-852 706
-internal_count del_count
-851 704
-internal_count del_count
-850 702
-internal_count del_count
-849 700
-internal_count del_count
-848 698
-internal_count del_count
-847 696
-internal_count del_count
-846 694
-internal_count del_count
-845 692
-internal_count del_count
-844 690
-internal_count del_count
-843 688
-internal_count del_count
-842 686
-internal_count del_count
-841 684
-internal_count del_count
-840 682
-internal_count del_count
-839 680
-internal_count del_count
-838 678
-internal_count del_count
-837 676
-internal_count del_count
-836 674
-internal_count del_count
-835 672
-internal_count del_count
-834 670
-internal_count del_count
-833 668
-internal_count del_count
-832 666
-internal_count del_count
-831 664
-internal_count del_count
-830 662
-internal_count del_count
-829 660
-internal_count del_count
-828 658
-internal_count del_count
-827 656
-internal_count del_count
-826 654
-internal_count del_count
-825 652
-internal_count del_count
-824 650
-internal_count del_count
-823 648
-internal_count del_count
-822 646
-internal_count del_count
-821 644
-internal_count del_count
-820 642
-internal_count del_count
-819 640
-internal_count del_count
-818 638
-internal_count del_count
-817 636
-internal_count del_count
-816 634
-internal_count del_count
-815 632
-internal_count del_count
-814 630
-internal_count del_count
-813 628
-internal_count del_count
-812 626
-internal_count del_count
-811 624
-internal_count del_count
-810 622
-internal_count del_count
-809 620
-internal_count del_count
-808 618
-internal_count del_count
-807 616
-internal_count del_count
-806 614
-internal_count del_count
-805 612
-internal_count del_count
-804 610
-internal_count del_count
-803 608
-internal_count del_count
-802 606
-internal_count del_count
-801 604
-internal_count del_count
-800 602
-internal_count del_count
-799 600
-internal_count del_count
-798 598
-internal_count del_count
-797 596
-internal_count del_count
-796 594
-internal_count del_count
-795 592
-internal_count del_count
-794 590
-internal_count del_count
-793 588
-internal_count del_count
-792 586
-internal_count del_count
-791 584
-internal_count del_count
-790 582
-internal_count del_count
-789 580
-internal_count del_count
-788 578
-internal_count del_count
-787 576
-internal_count del_count
-786 574
-internal_count del_count
-785 572
-internal_count del_count
-784 570
-internal_count del_count
-783 568
-internal_count del_count
-782 566
-internal_count del_count
-781 564
-internal_count del_count
-780 562
-internal_count del_count
-779 560
-internal_count del_count
-778 558
-internal_count del_count
-777 556
-internal_count del_count
-776 554
-internal_count del_count
-775 552
-internal_count del_count
-774 550
-internal_count del_count
-773 548
-internal_count del_count
-772 546
-internal_count del_count
-771 544
-internal_count del_count
-770 542
-internal_count del_count
-769 540
-internal_count del_count
-768 538
-internal_count del_count
-767 536
-internal_count del_count
-766 534
-internal_count del_count
-765 532
-internal_count del_count
-764 530
-internal_count del_count
-763 528
-internal_count del_count
-762 526
-internal_count del_count
-761 524
-internal_count del_count
-760 522
-internal_count del_count
-759 520
-internal_count del_count
-758 518
-internal_count del_count
-757 516
-internal_count del_count
-756 514
-internal_count del_count
-755 512
-internal_count del_count
-754 510
-internal_count del_count
-753 508
-internal_count del_count
-752 506
-internal_count del_count
-751 504
-internal_count del_count
-750 502
-internal_count del_count
-749 500
-internal_count del_count
-748 498
-internal_count del_count
-747 496
-internal_count del_count
-746 494
-internal_count del_count
-745 492
-internal_count del_count
-744 490
-internal_count del_count
-743 488
-internal_count del_count
-742 486
-internal_count del_count
-741 484
-internal_count del_count
-740 482
-internal_count del_count
-739 480
-internal_count del_count
-738 478
-internal_count del_count
-737 476
-internal_count del_count
-736 474
-internal_count del_count
-735 472
-internal_count del_count
-734 470
-internal_count del_count
-733 468
-internal_count del_count
-732 466
-internal_count del_count
-731 464
-internal_count del_count
-730 462
-internal_count del_count
-729 460
-internal_count del_count
-728 458
-internal_count del_count
-727 456
-internal_count del_count
-726 454
-internal_count del_count
-725 452
-internal_count del_count
-724 450
-internal_count del_count
-723 448
-internal_count del_count
-722 446
-internal_count del_count
-721 444
-internal_count del_count
-720 442
-internal_count del_count
-719 440
-internal_count del_count
-718 438
-internal_count del_count
-717 436
-internal_count del_count
-716 434
-internal_count del_count
-715 432
-internal_count del_count
-714 430
-internal_count del_count
-713 428
-internal_count del_count
-712 426
-internal_count del_count
-711 424
-internal_count del_count
-710 422
-internal_count del_count
-709 420
-internal_count del_count
-708 418
-internal_count del_count
-707 416
-internal_count del_count
-706 414
-internal_count del_count
-705 412
-internal_count del_count
-704 410
-internal_count del_count
-703 408
-internal_count del_count
-702 406
-internal_count del_count
-701 404
-internal_count del_count
-700 402
-internal_count del_count
-699 400
-internal_count del_count
-698 398
-internal_count del_count
-697 396
-internal_count del_count
-696 394
-internal_count del_count
-695 392
-internal_count del_count
-694 390
-internal_count del_count
-693 388
-internal_count del_count
-692 386
-internal_count del_count
-691 384
-internal_count del_count
-690 382
-internal_count del_count
-689 380
-internal_count del_count
-688 378
-internal_count del_count
-687 376
-internal_count del_count
-686 374
-internal_count del_count
-685 372
-internal_count del_count
-684 370
-internal_count del_count
-683 368
-internal_count del_count
-682 366
-internal_count del_count
-681 364
-internal_count del_count
-680 362
-internal_count del_count
-679 360
-internal_count del_count
-678 358
-internal_count del_count
-677 356
-internal_count del_count
-676 354
-internal_count del_count
-675 352
-internal_count del_count
-674 350
-internal_count del_count
-673 348
-internal_count del_count
-672 346
-internal_count del_count
-671 344
-internal_count del_count
-670 342
-internal_count del_count
-669 340
-internal_count del_count
-668 338
-internal_count del_count
-667 336
-internal_count del_count
-666 334
-internal_count del_count
-665 332
-internal_count del_count
-664 330
-internal_count del_count
-663 328
-internal_count del_count
-662 326
-internal_count del_count
-661 324
-internal_count del_count
-660 322
-internal_count del_count
-659 320
-internal_count del_count
-658 318
-internal_count del_count
-657 316
-internal_count del_count
-656 314
-internal_count del_count
-655 312
-internal_count del_count
-654 310
-internal_count del_count
-653 308
-internal_count del_count
-652 306
-internal_count del_count
-651 304
-internal_count del_count
-650 302
-internal_count del_count
-649 300
-internal_count del_count
-648 298
-internal_count del_count
-647 296
-internal_count del_count
-646 294
-internal_count del_count
-645 292
-internal_count del_count
-644 290
-internal_count del_count
-643 288
-internal_count del_count
-642 286
-internal_count del_count
-641 284
-internal_count del_count
-640 282
-internal_count del_count
-639 280
-internal_count del_count
-638 278
-internal_count del_count
-637 276
-internal_count del_count
-636 274
-internal_count del_count
-635 272
-internal_count del_count
-634 270
-internal_count del_count
-633 268
-internal_count del_count
-632 266
-internal_count del_count
-631 264
-internal_count del_count
-630 262
-internal_count del_count
-629 260
-internal_count del_count
-628 258
-internal_count del_count
-627 256
-internal_count del_count
-626 254
-internal_count del_count
-625 252
-internal_count del_count
-624 250
-internal_count del_count
-623 248
-internal_count del_count
-622 246
-internal_count del_count
-621 244
-internal_count del_count
-620 242
-internal_count del_count
-619 240
-internal_count del_count
-618 238
-internal_count del_count
-617 236
-internal_count del_count
-616 234
-internal_count del_count
-615 232
-internal_count del_count
-614 230
-internal_count del_count
-613 228
-internal_count del_count
-612 226
-internal_count del_count
-611 224
-internal_count del_count
-610 222
-internal_count del_count
-609 220
-internal_count del_count
-608 218
-internal_count del_count
-607 216
-internal_count del_count
-606 214
-internal_count del_count
-605 212
-internal_count del_count
-604 210
-internal_count del_count
-603 208
-internal_count del_count
-602 206
-internal_count del_count
-601 204
-internal_count del_count
-600 202
-internal_count del_count
-599 200
-internal_count del_count
-598 198
-internal_count del_count
-597 196
-internal_count del_count
-596 194
-internal_count del_count
-595 192
-internal_count del_count
-594 190
-internal_count del_count
-593 188
-internal_count del_count
-592 186
-internal_count del_count
-591 184
-internal_count del_count
-590 182
-internal_count del_count
-589 180
-internal_count del_count
-588 178
-internal_count del_count
-587 176
-internal_count del_count
-586 174
-internal_count del_count
-585 172
-internal_count del_count
-584 170
-internal_count del_count
-583 168
-internal_count del_count
-582 166
-internal_count del_count
-581 164
-internal_count del_count
-580 162
-internal_count del_count
-579 160
-internal_count del_count
-578 158
-internal_count del_count
-577 156
-internal_count del_count
-576 154
-internal_count del_count
-575 152
-internal_count del_count
-574 150
-internal_count del_count
-573 148
-internal_count del_count
-572 146
-internal_count del_count
-571 144
-internal_count del_count
-570 142
-internal_count del_count
-569 140
-internal_count del_count
-568 138
-internal_count del_count
-567 136
-internal_count del_count
-566 134
-internal_count del_count
-565 132
-internal_count del_count
-564 130
-internal_count del_count
-563 128
-internal_count del_count
-562 126
-internal_count del_count
-561 124
-internal_count del_count
-560 122
-internal_count del_count
-559 120
-internal_count del_count
-558 118
-internal_count del_count
-557 116
-internal_count del_count
-556 114
-internal_count del_count
-555 112
-internal_count del_count
-554 110
-internal_count del_count
-553 108
-internal_count del_count
-552 106
-internal_count del_count
-551 104
-internal_count del_count
-550 102
-internal_count del_count
-549 100
-internal_count del_count
-548 98
-internal_count del_count
-547 96
-internal_count del_count
-546 94
-internal_count del_count
-545 92
-internal_count del_count
-544 90
-internal_count del_count
-543 88
-internal_count del_count
-542 86
-internal_count del_count
-541 84
-internal_count del_count
-540 82
-internal_count del_count
-539 80
-internal_count del_count
-538 78
-internal_count del_count
-537 76
-internal_count del_count
-536 74
-internal_count del_count
-535 72
-internal_count del_count
-534 70
-internal_count del_count
-533 68
-internal_count del_count
-532 66
-internal_count del_count
-531 64
-internal_count del_count
-530 62
-internal_count del_count
-529 60
-internal_count del_count
-528 58
-internal_count del_count
-527 56
-internal_count del_count
-526 54
-internal_count del_count
-525 52
-internal_count del_count
-524 50
-internal_count del_count
-523 48
-internal_count del_count
-522 46
-internal_count del_count
-521 44
-internal_count del_count
-520 42
-internal_count del_count
-519 40
-internal_count del_count
-518 38
-internal_count del_count
-517 36
-internal_count del_count
-516 34
-internal_count del_count
-515 32
-internal_count del_count
-514 30
-internal_count del_count
-513 28
-internal_count del_count
-512 26
-internal_count del_count
-511 24
-internal_count del_count
-510 22
-internal_count del_count
-509 20
-internal_count del_count
-508 18
-internal_count del_count
-507 16
-internal_count del_count
-506 14
-internal_count del_count
-505 12
-internal_count del_count
-504 10
-internal_count del_count
-503 8
-internal_count del_count
-502 6
-internal_count del_count
-501 4
-internal_count del_count
-500 2
-select count(*) as Part from test.part_tbl;
-Part
-500
-DROP PROCEDURE test.proc_part;
-DROP TABLE test.part_tbl;
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result
index 85308442fd8..fbb1e2355c3 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result
@@ -77,7 +77,7 @@ t1 CREATE TABLE `t1` (
`b` char(254) DEFAULT NULL,
PRIMARY KEY (`a`),
KEY `index1` (`b`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -85,7 +85,7 @@ t2 CREATE TABLE `t2` (
`b` char(254) DEFAULT NULL,
PRIMARY KEY (`a`),
KEY `index1` (`b`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
******************** DDL for indexes ********************
ALTER TABLE t2 ADD COLUMN d datetime;
@@ -120,7 +120,7 @@ t1 CREATE TABLE `t1` (
`b` char(254) DEFAULT NULL,
PRIMARY KEY (`a`),
KEY `index1` (`b`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -131,7 +131,7 @@ t2 CREATE TABLE `t2` (
KEY `index1` (`b`),
KEY `index2` (`d`),
KEY `index3` (`a`,`d`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE t2 DROP COLUMN d;
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
index d70d8dadf54..8602718ba46 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
@@ -103,7 +103,7 @@ DELETE FROM t1;
DELETE FROM t2;
******************** LOAD DATA INFILE ********************
-LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
SELECT * FROM t1 ORDER BY a;
a b
10 line A
@@ -885,7 +885,7 @@ master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid 1 # #
master-bin.000001 # Query 1 # use `test_rpl`; BEGIN
master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=#
-master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;file_id=#
+master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;file_id=#
master-bin.000001 # Xid 1 # #
master-bin.000001 # Query 1 # use `test_rpl`; BEGIN
master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
diff --git a/mysql-test/suite/rpl/r/rpl_load_table_from_master.result b/mysql-test/suite/rpl/r/rpl_load_table_from_master.result
index c24f857d829..9d9a1d7d6cb 100644
--- a/mysql-test/suite/rpl/r/rpl_load_table_from_master.result
+++ b/mysql-test/suite/rpl/r/rpl_load_table_from_master.result
@@ -29,9 +29,9 @@ 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_ln/words.dat' into table t1;
+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_ln/words.dat' into table t2;
+load data infile '../../std_data/words.dat' into table t2;
create table t3 (word char(20) not null primary key)ENGINE=MyISAM;
load table t1 from master;
load table t2 from master;
diff --git a/mysql-test/suite/rpl/r/rpl_loaddata.result b/mysql-test/suite/rpl/r/rpl_loaddata.result
index 070c50db3d5..d7a02bc84a5 100644
--- a/mysql-test/suite/rpl/r/rpl_loaddata.result
+++ b/mysql-test/suite/rpl/r/rpl_loaddata.result
@@ -9,12 +9,12 @@ select last_insert_id();
last_insert_id()
0
create table t1(a int not null auto_increment, b int, primary key(a) );
-load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
+load data infile '../../std_data/rpl_loaddata.dat' into table t1;
select last_insert_id();
last_insert_id()
1
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
-load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
+load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
insert into t3 select * from t2;
select * from t1;
@@ -31,7 +31,7 @@ drop table t2;
drop table t3;
create table t1(a int, b int, unique(b));
insert into t1 values(1,10);
-load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
+load data infile '../../std_data/rpl_loaddata.dat' into table t1;
set global sql_slave_skip_counter=1;
start slave;
show slave status;
@@ -40,7 +40,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
set sql_log_bin=0;
delete from t1;
set sql_log_bin=1;
-load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
+load data infile '../../std_data/rpl_loaddata.dat' into table t1;
stop slave;
change master to master_user='test';
change master to master_user='root';
@@ -52,7 +52,7 @@ start slave;
set sql_log_bin=0;
delete from t1;
set sql_log_bin=1;
-load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
+load data infile '../../std_data/rpl_loaddata.dat' into table t1;
stop slave;
reset slave;
show slave status;
@@ -61,7 +61,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
reset master;
create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
unique(day)) engine=MyISAM;
-load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields
+load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines;
ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
@@ -76,14 +76,13 @@ day id category name
2003-03-22 2161 c asdf
alter table t2 drop key day;
delete from t2;
-load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields
+load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines;
ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
-drop table t2;
-drop table t2;
-drop table t1;
+drop table t1, t2;
+drop table t1, t2;
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
-LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1;
+LOAD DATA INFILE "../../std_data/words.dat" INTO TABLE t1;
ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY'
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_charset.result b/mysql-test/suite/rpl/r/rpl_loaddata_charset.result
index 929d06e74cf..7ba67150cb9 100644
--- a/mysql-test/suite/rpl/r/rpl_loaddata_charset.result
+++ b/mysql-test/suite/rpl/r/rpl_loaddata_charset.result
@@ -5,17 +5,17 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1 (a varchar(10) character set utf8);
-load data infile '../std_data_ln/loaddata6.dat' into table t1;
+load data infile '../../std_data/loaddata6.dat' into table t1;
set @@character_set_database=koi8r;
-load data infile '../std_data_ln/loaddata6.dat' into table t1;
+load data infile '../../std_data/loaddata6.dat' into table t1;
set @@character_set_database=DEFAULT;
-load data infile '../std_data_ln/loaddata6.dat' into table t1;
-load data infile '../std_data_ln/loaddata6.dat' into table t1;
-load data infile '../std_data_ln/loaddata6.dat' into table t1;
+load data infile '../../std_data/loaddata6.dat' into table t1;
+load data infile '../../std_data/loaddata6.dat' into table t1;
+load data infile '../../std_data/loaddata6.dat' into table t1;
set @@character_set_database=koi8r;
-load data infile '../std_data_ln/loaddata6.dat' into table t1;
+load data infile '../../std_data/loaddata6.dat' into table t1;
set @@character_set_database=DEFAULT;
-load data infile '../std_data_ln/loaddata6.dat' into table t1 character set koi8r;
+load data infile '../../std_data/loaddata6.dat' into table t1 character set koi8r;
select hex(a) from t1;
hex(a)
C3BF
diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
index a4d67754bd6..27fb8623e85 100644
--- a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
+++ b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
@@ -45,7 +45,7 @@ Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
-LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE t1;
+LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_m.result b/mysql-test/suite/rpl/r/rpl_loaddata_m.result
index 9dbae6d38c4..a1294d515fa 100644
--- a/mysql-test/suite/rpl/r/rpl_loaddata_m.result
+++ b/mysql-test/suite/rpl/r/rpl_loaddata_m.result
@@ -7,20 +7,21 @@ start slave;
drop database if exists mysqltest;
USE test;
CREATE TABLE t1(a INT, b INT, UNIQUE(b));
-LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE test.t1;
+LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE test.t1;
SELECT COUNT(*) FROM test.t1;
COUNT(*)
2
CREATE DATABASE mysqltest;
USE mysqltest;
CREATE TABLE t1(a INT, b INT, UNIQUE(b));
-LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE mysqltest.t1;
+LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE mysqltest.t1;
SELECT COUNT(*) FROM mysqltest.t1;
COUNT(*)
2
SHOW DATABASES;
Database
information_schema
+mtr
mysql
mysqltest
test
diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_s.result b/mysql-test/suite/rpl/r/rpl_loaddata_s.result
index 4fc33eee20d..779a3af9631 100644
--- a/mysql-test/suite/rpl/r/rpl_loaddata_s.result
+++ b/mysql-test/suite/rpl/r/rpl_loaddata_s.result
@@ -6,7 +6,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
reset master;
create table test.t1(a int, b int, unique(b));
-load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1;
+load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
select count(*) from test.t1;
count(*)
2
diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_simple.result b/mysql-test/suite/rpl/r/rpl_loaddata_simple.result
index 196093211b6..5e3923616ed 100644
--- a/mysql-test/suite/rpl/r/rpl_loaddata_simple.result
+++ b/mysql-test/suite/rpl/r/rpl_loaddata_simple.result
@@ -5,7 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TABLE t1 (word CHAR(20) NOT NULL);
-LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1;
+LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
SELECT * FROM t1 ORDER BY word;
word
Aarhus
diff --git a/mysql-test/suite/rpl/r/rpl_loaddatalocal.result b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result
index bb1b0610aa8..96de55e9dcf 100644
--- a/mysql-test/suite/rpl/r/rpl_loaddatalocal.result
+++ b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result
@@ -5,19 +5,19 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1(a int);
-select * into outfile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1;
+select * into outfile 'MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1;
truncate table t1;
-load data local infile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1;
+load data local infile 'MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' into table t1;
select a,count(*) from t1 group by a;
a count(*)
1 10000
drop table t1;
create table t1(a int);
insert into t1 values (1), (2), (2), (3);
-select * into outfile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1;
+select * into outfile 'MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1;
drop table t1;
create table t1(a int primary key);
-load data local infile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1;
+load data local infile 'MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' into table t1;
SELECT * FROM t1 ORDER BY a;
a
1
diff --git a/mysql-test/suite/rpl/r/rpl_loadfile.result b/mysql-test/suite/rpl/r/rpl_loadfile.result
index 7487693a9f7..7a5a7bc50c9 100644
--- a/mysql-test/suite/rpl/r/rpl_loadfile.result
+++ b/mysql-test/suite/rpl/r/rpl_loadfile.result
@@ -8,11 +8,11 @@ DROP PROCEDURE IF EXISTS test.p1;
DROP TABLE IF EXISTS test.t1;
CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a));
INSERT INTO test.t1 VALUES(1,'test');
-UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=1;
+UPDATE test.t1 SET blob_column=LOAD_FILE('../../std_data/words2.dat') WHERE a=1;
create procedure test.p1()
begin
INSERT INTO test.t1 VALUES(2,'test');
-UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=2;
+UPDATE test.t1 SET blob_column=LOAD_FILE('../../std_data/words2.dat') WHERE a=2;
end|
CALL test.p1();
SELECT * FROM test.t1 ORDER BY blob_column;
diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result
index e0c4dedde10..7b3ebf62959 100644
--- a/mysql-test/suite/rpl/r/rpl_log_pos.result
+++ b/mysql-test/suite/rpl/r/rpl_log_pos.result
@@ -7,7 +7,7 @@ start slave;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
-stop slave;
+include/stop_slave.inc
change master to master_log_pos=75;
SHOW SLAVE STATUS;
Slave_IO_State #
@@ -49,7 +49,7 @@ Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave;
-stop slave;
+include/stop_slave.inc
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
diff --git a/mysql-test/suite/rpl/r/rpl_misc_functions.result b/mysql-test/suite/rpl/r/rpl_misc_functions.result
index a8e5520ca8f..28b777822e4 100644
--- a/mysql-test/suite/rpl/r/rpl_misc_functions.result
+++ b/mysql-test/suite/rpl/r/rpl_misc_functions.result
@@ -14,8 +14,8 @@ set sql_log_bin=1;
insert into t1 values(3, 0, 0, 0, password('does_this_work?'));
insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?'));
select * into outfile 'rpl_misc_functions.outfile' from t1;
-create table t2 like t1;
-load data local infile 'MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile' into table t2;
+create temporary table t2 like t1;
+load data local infile 'MYSQLD_DATADIR/test/rpl_misc_functions.outfile' into table t2;
select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p);
id i r1 r2 p id i r1 r2 p
drop table t1;
@@ -41,9 +41,9 @@ CALL test_replication_sp2();
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
-select * from t1 into outfile "../tmp/t1_slave.txt";
+select * from t1 into outfile "../../tmp/t1_slave.txt";
create temporary table t1_slave select * from t1 where 1=0;
-load data infile '../tmp/t1_slave.txt' into table t1_slave;
+load data infile '../../tmp/t1_slave.txt' into table t1_slave;
select count(*) into @aux from t1 join t1_slave using (id)
where ABS(t1.col_a - t1_slave.col_a) < 0.0000001 ;
SELECT @aux;
diff --git a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result
index 38972a4f571..08d3241c48f 100644
--- a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result
+++ b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result
@@ -14,7 +14,7 @@ n
2002
show slave hosts;
Server_id Host Port Rpl_recovery_rank Master_id
-2 127.0.0.1 9999 2 1
+2 127.0.0.1 9999 0 1
drop table t1;
stop slave;
create table t2(id int auto_increment primary key, created datetime);
diff --git a/mysql-test/suite/rpl/r/rpl_multi_engine.result b/mysql-test/suite/rpl/r/rpl_multi_engine.result
index 7cb7d873415..e26777c15ce 100644
--- a/mysql-test/suite/rpl/r/rpl_multi_engine.result
+++ b/mysql-test/suite/rpl/r/rpl_multi_engine.result
@@ -4,13 +4,10 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-create database if not exists mysqltest1;
-use mysqltest1;
drop table if exists t1;
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc
VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT
0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id));
-use mysqltest1;
alter table t1 engine=myisam;
show create table t1;
Table Create Table
@@ -55,7 +52,7 @@ id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00
-DELETE FROM mysqltest1.t1 WHERE id = 42;
+DELETE FROM t1 WHERE id = 42;
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
@@ -89,7 +86,7 @@ id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00
-DELETE FROM mysqltest1.t1 WHERE id = 42;
+DELETE FROM t1 WHERE id = 42;
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
@@ -123,7 +120,7 @@ id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00
-DELETE FROM mysqltest1.t1 WHERE id = 42;
+DELETE FROM t1 WHERE id = 42;
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
@@ -172,7 +169,7 @@ id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00
-DELETE FROM mysqltest1.t1 WHERE id = 42;
+DELETE FROM t1 WHERE id = 42;
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
@@ -206,7 +203,7 @@ id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00
-DELETE FROM mysqltest1.t1 WHERE id = 42;
+DELETE FROM t1 WHERE id = 42;
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
@@ -240,7 +237,7 @@ id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00
-DELETE FROM mysqltest1.t1 WHERE id = 42;
+DELETE FROM t1 WHERE id = 42;
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
@@ -289,7 +286,7 @@ id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00
-DELETE FROM mysqltest1.t1 WHERE id = 42;
+DELETE FROM t1 WHERE id = 42;
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
@@ -323,7 +320,7 @@ id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00
-DELETE FROM mysqltest1.t1 WHERE id = 42;
+DELETE FROM t1 WHERE id = 42;
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
@@ -357,10 +354,9 @@ id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00
-DELETE FROM mysqltest1.t1 WHERE id = 42;
+DELETE FROM t1 WHERE id = 42;
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
DROP TABLE t1;
-DROP DATABASE mysqltest1;
diff --git a/mysql-test/suite/rpl/r/rpl_packet.result b/mysql-test/suite/rpl/r/rpl_packet.result
index f89d6b3459a..4c64054e348 100644
--- a/mysql-test/suite/rpl/r/rpl_packet.result
+++ b/mysql-test/suite/rpl/r/rpl_packet.result
@@ -8,8 +8,8 @@ drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________
create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
SET @@global.max_allowed_packet=1024;
SET @@global.net_buffer_length=1024;
-STOP SLAVE;
-START SLAVE;
+include/stop_slave.inc
+include/start_slave.inc
select @@net_buffer_length, @@max_allowed_packet;
@@net_buffer_length @@max_allowed_packet
1024 1024
@@ -27,46 +27,13 @@ SLAVE_RUNNING ON
drop database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
SET @@global.max_allowed_packet=4096;
SET @@global.net_buffer_length=4096;
-STOP SLAVE;
-START SLAVE;
-CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
+include/stop_slave.inc
+include/start_slave.inc
+CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running No
-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 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
+Slave_IO_Running = No (expect No)
+==== clean up ====
+DROP TABLE t1;
+SET @@global.max_allowed_packet= 1024;
+SET @@global.net_buffer_length= 1024;
+DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_ps.result b/mysql-test/suite/rpl/r/rpl_ps.result
index faba43ae934..89e822b3eb6 100644
--- a/mysql-test/suite/rpl/r/rpl_ps.result
+++ b/mysql-test/suite/rpl/r/rpl_ps.result
@@ -68,6 +68,7 @@ test latin1_swedish_ci
DROP DATABASE mysqltest1;
use test;
+DROP TABLE t1;
# Connection: slave
diff --git a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
index 8f145b94046..0551240eb8a 100644
--- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
+++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+SET @old_binlog_format= @@global.binlog_format;
SET BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
@@ -65,7 +66,6 @@ Last_SQL_Error
SHOW BINLOG EVENTS;
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 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG)
slave-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
slave-bin.000001 # Query 1 # use `test`; BEGIN
@@ -73,3 +73,4 @@ slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # use `test`; COMMIT
DROP TABLE IF EXISTS t1;
+SET @@global.binlog_format= @old_binlog_format;
diff --git a/mysql-test/suite/rpl/r/rpl_replicate_do.result b/mysql-test/suite/rpl/r/rpl_replicate_do.result
index d854a2d0f8d..33088ee2ec8 100644
--- a/mysql-test/suite/rpl/r/rpl_replicate_do.result
+++ b/mysql-test/suite/rpl/r/rpl_replicate_do.result
@@ -9,7 +9,7 @@ drop table if exists t11;
create table t2 (n int);
insert into t2 values(4);
create table t2 (s char(20));
-load data infile '../std_data_ln/words.dat' into table t2;
+load data infile '../../std_data/words.dat' into table t2;
insert into t2 values('five');
create table t1 (m int);
insert into t1 values(15),(16),(17);
diff --git a/mysql-test/suite/rpl/r/rpl_rewrt_db.result b/mysql-test/suite/rpl/r/rpl_rewrt_db.result
index 1b843bffdca..76dd574191f 100644
--- a/mysql-test/suite/rpl/r/rpl_rewrt_db.result
+++ b/mysql-test/suite/rpl/r/rpl_rewrt_db.result
@@ -24,7 +24,7 @@ drop database if exists rewrite;
create database rewrite;
use test;
create table t1 (a date, b date, c date not null, d date);
-load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',';
+load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',';
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Warning 1265 Data truncated for column 'c' at row 1
@@ -32,7 +32,7 @@ Warning 1265 Data truncated for column 'd' at row 1
Warning 1265 Data truncated for column 'a' at row 2
Warning 1265 Data truncated for column 'b' at row 2
Warning 1265 Data truncated for column 'd' at row 2
-load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
+load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
select * from rewrite.t1;
a b c d
0000-00-00 NULL 0000-00-00 0000-00-00
@@ -40,7 +40,7 @@ a b c d
2003-03-03 2003-03-03 2003-03-03 NULL
2003-03-03 2003-03-03 2003-03-03 NULL
truncate table t1;
-load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
+load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
Warning 1265 Data truncated for column 'd' at row 1
@@ -53,7 +53,7 @@ NULL 0000-00-00 0000-00-00 0000-00-00
NULL 2003-03-03 2003-03-03 NULL
drop table t1;
create table t1 (a text, b text);
-load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
+load data infile '../../std_data/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
Warnings:
Warning 1261 Row 3 doesn't contain data for all columns
select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1;
@@ -65,7 +65,7 @@ Field 3,'Field 4|
|Field 6| | 'Field 7'|
drop table t1;
create table t1 (a int, b char(10));
-load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
+load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
Warnings:
Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3
Warning 1262 Row 3 was truncated; it contained more data than there were input columns
@@ -79,7 +79,7 @@ a b
3 row 3
0 1234567890
truncate table t1;
-load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
+load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
Warnings:
Warning 1366 Incorrect integer value: '
' for column 'a' at row 4
diff --git a/mysql-test/suite/rpl/r/rpl_row_001.result b/mysql-test/suite/rpl/r/rpl_row_001.result
index fad60af664f..0d682eb82e1 100644
--- a/mysql-test/suite/rpl/r/rpl_row_001.result
+++ b/mysql-test/suite/rpl/r/rpl_row_001.result
@@ -5,8 +5,8 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TABLE t1 (word CHAR(20) NOT NULL);
-LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1;
-LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/std_data/words.dat' INTO TABLE t1;
+LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1;
+LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1;
SELECT * FROM t1 ORDER BY word LIMIT 10;
word
Aarhus
diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
index 670456ba6fd..1504c16bd7e 100644
--- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
@@ -9,6 +9,7 @@ CREATE DATABASE test_ignore;
SHOW DATABASES;
Database
information_schema
+mtr
mysql
test
test_ignore
@@ -35,6 +36,7 @@ master-bin.000001 # Query # # use `test`; COMMIT
SHOW DATABASES;
Database
information_schema
+mtr
mysql
test
USE test;
diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
index 77148fc688c..a980092ac37 100644
--- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
@@ -423,10 +423,10 @@ a b c
**** On Master ****
DELETE FROM t1;
**** Resetting master and slave ****
-STOP SLAVE;
+include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
-START SLAVE;
+include/start_slave.inc
**** On Master ****
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
**** On Master ****
diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
index 8d071d503bc..ea0c322fe6d 100644
--- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
@@ -423,10 +423,10 @@ a b c
**** On Master ****
DELETE FROM t1;
**** Resetting master and slave ****
-STOP SLAVE;
+include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
-START SLAVE;
+include/start_slave.inc
**** On Master ****
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
**** On Master ****
diff --git a/mysql-test/suite/rpl/r/rpl_row_conflicts.result b/mysql-test/suite/rpl/r/rpl_row_conflicts.result
new file mode 100644
index 00000000000..0f15bfc7156
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_row_conflicts.result
@@ -0,0 +1,109 @@
+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;
+call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: .*");
+[on slave]
+SET @old_slave_exec_mode= @@global.slave_exec_mode;
+######## Run with slave_exec_mode=STRICT ########
+SET @@global.slave_exec_mode = 'STRICT';
+==== Initialize ====
+[on master]
+CREATE TABLE t1(a INT PRIMARY KEY);
+[on slave]
+==== Test: SQL thread sees 'INSERT' of existing key ====
+---- Prepare slave so that it will get duplicate key error ----
+INSERT INTO t1 VALUES (1);
+---- Insert rows on master ----
+[on master]
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1;
+a
+1
+[on slave]
+---- Wait until slave stops with an error ----
+Last_SQL_Error = Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos 346 (expected "duplicate key" error)
+SELECT * FROM t1;
+a
+1
+---- Resolve the conflict on the slave and restart SQL thread ----
+DELETE FROM t1 WHERE a = 1;
+START SLAVE SQL_THREAD;
+---- Sync slave and verify that there is no error ----
+Last_SQL_Error = '' (expected no error)
+SELECT * FROM t1;
+a
+1
+==== Test: SQL thread sees 'DELETE' of non-existing row ====
+---- On master, insert two rows, the second with binlogging off ----
+[on master]
+DELETE FROM t1;
+INSERT INTO t1 VALUES (1);
+[on slave]
+DELETE FROM t1 WHERE a = 1;
+---- On master, remove the row that does not exist on slave ----
+[on master]
+DELETE FROM t1 WHERE a = 1;
+SELECT * FROM t1;
+a
+[on slave]
+---- Wait until slave stops with an error ----
+Last_SQL_Error = Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos 982 (expected "can't find record" error)
+SELECT * FROM t1;
+a
+---- Resolve the conflict on the slave and restart SQL thread ----
+INSERT INTO t1 VALUES (1);
+START SLAVE SQL_THREAD;
+---- Sync slave and verify that there is no error ----
+Last_SQL_Error = (expected no error)
+SELECT * FROM t1;
+a
+==== Clean up ====
+[on master]
+DROP TABLE t1;
+[on slave]
+######## Run with slave_exec_mode=IDEMPOTENT ########
+set @@global.slave_exec_mode= 'IDEMPOTENT';
+==== Initialize ====
+[on master]
+CREATE TABLE t1(a INT PRIMARY KEY);
+[on slave]
+==== Test: SQL thread sees 'INSERT' of existing key ====
+---- Prepare slave so that it will get duplicate key error ----
+INSERT INTO t1 VALUES (1);
+---- Insert rows on master ----
+[on master]
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1;
+a
+1
+[on slave]
+---- Sync slave and verify that there is no error ----
+Last_SQL_Error = '' (expected no error)
+SELECT * FROM t1;
+a
+1
+==== Test: SQL thread sees 'DELETE' of non-existing row ====
+---- On master, insert two rows, the second with binlogging off ----
+[on master]
+DELETE FROM t1;
+INSERT INTO t1 VALUES (1);
+[on slave]
+DELETE FROM t1 WHERE a = 1;
+---- On master, remove the row that does not exist on slave ----
+[on master]
+DELETE FROM t1 WHERE a = 1;
+SELECT * FROM t1;
+a
+[on slave]
+---- Sync slave and verify that there is no error ----
+Last_SQL_Error = (expected no error)
+SELECT * FROM t1;
+a
+==== Clean up ====
+[on master]
+DROP TABLE t1;
+[on slave]
+SET @@global.slave_exec_mode= @old_slave_exec_mode;
diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result
index ad659c37b7f..29f58632fde 100644
--- a/mysql-test/suite/rpl/r/rpl_row_create_table.result
+++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result
@@ -4,34 +4,39 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+**** Resetting master and slave ****
+include/stop_slave.inc
+RESET SLAVE;
+RESET MASTER;
+include/start_slave.inc
CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
-SHOW BINLOG EVENTS FROM 216;
+SHOW BINLOG EVENTS FROM 106;
Log_name #
-Pos 216
+Pos 106
Event_type Query
Server_id #
-End_log_pos 309
+End_log_pos 199
Info use `test`; CREATE TABLE t1 (a INT, b INT)
Log_name #
-Pos 309
+Pos 199
Event_type Query
Server_id #
-End_log_pos 415
+End_log_pos 305
Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge
Log_name #
-Pos 415
+Pos 305
Event_type Query
Server_id #
-End_log_pos 521
+End_log_pos 411
Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8
Log_name #
-Pos 521
+Pos 411
Event_type Query
Server_id #
-End_log_pos 640
+End_log_pos 530
Info use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8
**** On Master ****
SHOW CREATE TABLE t1;
@@ -125,9 +130,14 @@ NULL 3 6
NULL 4 2
NULL 5 10
NULL 6 12
+**** Resetting master and slave ****
+include/stop_slave.inc
+RESET SLAVE;
+RESET MASTER;
+include/start_slave.inc
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
ERROR 23000: Duplicate entry '2' for key 'b'
-SHOW BINLOG EVENTS FROM 1374;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
CREATE TABLE t7 (a INT, b INT UNIQUE);
INSERT INTO t7 SELECT a,b FROM tt3;
@@ -137,18 +147,23 @@ a b
1 2
2 4
3 6
-SHOW BINLOG EVENTS FROM 1374;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
-# 1374 Query # 1474 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
-# 1474 Query # 1542 use `test`; BEGIN
-# 1542 Table_map # 1584 table_id: # (test.t7)
-# 1584 Write_rows # 1640 table_id: # flags: STMT_END_F
-# 1640 Query # 1711 use `test`; ROLLBACK
+# 106 Query # 206 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
+# 206 Query # 274 use `test`; BEGIN
+# 274 Table_map # 316 table_id: # (test.t7)
+# 316 Write_rows # 372 table_id: # flags: STMT_END_F
+# 372 Query # 443 use `test`; ROLLBACK
SELECT * FROM t7 ORDER BY a,b;
a b
1 2
2 4
3 6
+**** Resetting master and slave ****
+include/stop_slave.inc
+RESET SLAVE;
+RESET MASTER;
+include/start_slave.inc
CREATE TEMPORARY TABLE tt4 (a INT, b INT);
INSERT INTO tt4 VALUES (4,8), (5,10), (6,12);
BEGIN;
@@ -156,12 +171,12 @@ INSERT INTO t7 SELECT a,b FROM tt4;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-SHOW BINLOG EVENTS FROM 1711;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
-# 1711 Query # 1779 use `test`; BEGIN
-# 1779 Table_map # 1821 table_id: # (test.t7)
-# 1821 Write_rows # 1877 table_id: # flags: STMT_END_F
-# 1877 Query # 1946 use `test`; COMMIT
+# 106 Query # 174 use `test`; BEGIN
+# 174 Table_map # 216 table_id: # (test.t7)
+# 216 Write_rows # 272 table_id: # flags: STMT_END_F
+# 272 Query # 343 use `test`; ROLLBACK
SELECT * FROM t7 ORDER BY a,b;
a b
1 2
@@ -178,6 +193,11 @@ a b
4 8
5 10
6 12
+**** Resetting master and slave ****
+include/stop_slave.inc
+RESET SLAVE;
+RESET MASTER;
+include/start_slave.inc
CREATE TABLE t8 LIKE t4;
CREATE TABLE t9 LIKE tt4;
CREATE TEMPORARY TABLE tt5 LIKE t4;
@@ -196,10 +216,10 @@ Create Table CREATE TABLE `t9` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-SHOW BINLOG EVENTS FROM 1946;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
-# 1946 Query # 2032 use `test`; CREATE TABLE t8 LIKE t4
-# 2032 Query # 2171 use `test`; CREATE TABLE `t9` (
+# 106 Query # 192 use `test`; CREATE TABLE t8 LIKE t4
+# 192 Query # 331 use `test`; CREATE TABLE `t9` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
)
@@ -276,9 +296,8 @@ a
1
2
3
-SHOW BINLOG EVENTS;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
-# 4 Format_desc # 106 Server ver: #, Binlog ver: #
# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
# 192 Query # 260 use `test`; BEGIN
# 260 Table_map # 301 table_id: # (test.t1)
@@ -308,7 +327,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
# 1329 Query # 1397 use `test`; BEGIN
# 1397 Table_map # 1438 table_id: # (test.t1)
# 1438 Write_rows # 1482 table_id: # flags: STMT_END_F
-# 1482 Query # 1551 use `test`; COMMIT
+# 1482 Query # 1553 use `test`; ROLLBACK
SHOW TABLES;
Tables_in_test
t1
@@ -371,9 +390,8 @@ a
4
6
9
-SHOW BINLOG EVENTS;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
-# 4 Format_desc # 106 Server ver: #, Binlog ver: #
# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
# 192 Query # 260 use `test`; BEGIN
# 260 Table_map # 301 table_id: # (test.t1)
@@ -394,6 +412,11 @@ a
6
9
TRUNCATE TABLE t2;
+**** Resetting master and slave ****
+include/stop_slave.inc
+RESET SLAVE;
+RESET MASTER;
+include/start_slave.inc
BEGIN;
INSERT INTO t2 SELECT a*a FROM t1;
CREATE TEMPORARY TABLE tt2
@@ -406,14 +429,14 @@ Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SELECT * FROM t2 ORDER BY a;
a
-SHOW BINLOG EVENTS FROM 949;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
-# 949 Query # 1017 use `test`; BEGIN
-# 1017 Table_map # 1058 table_id: # (test.t2)
-# 1058 Write_rows # 1102 table_id: # flags: STMT_END_F
-# 1102 Table_map # 1143 table_id: # (test.t2)
-# 1143 Write_rows # 1182 table_id: # flags: STMT_END_F
-# 1182 Query # 1253 use `test`; ROLLBACK
+# 106 Query # 174 use `test`; BEGIN
+# 174 Table_map # 215 table_id: # (test.t2)
+# 215 Write_rows # 259 table_id: # flags: STMT_END_F
+# 259 Table_map # 300 table_id: # (test.t2)
+# 300 Write_rows # 339 table_id: # flags: STMT_END_F
+# 339 Query # 410 use `test`; ROLLBACK
SELECT * FROM t2 ORDER BY a;
a
DROP TABLE t1,t2;
@@ -436,11 +459,13 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+DROP DATABASE IF EXISTS mysqltest1;
CREATE DATABASE mysqltest1;
CREATE TABLE mysqltest1.without_select (f1 BIGINT);
CREATE TABLE mysqltest1.with_select AS SELECT 1 AS f1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # DROP DATABASE IF EXISTS mysqltest1
master-bin.000001 # Query # # CREATE DATABASE mysqltest1
master-bin.000001 # Query # # use `test`; CREATE TABLE mysqltest1.without_select (f1 BIGINT)
master-bin.000001 # Query # # use `test`; BEGIN
diff --git a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
index 04db52c840b..18a5dbfccc1 100644
--- a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
+++ b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
@@ -30,4 +30,5 @@ flush tables with read lock;
start slave;
stop slave;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+unlock tables;
drop table t3, t4, t5;
diff --git a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result
index 1dd97878666..562e3dc2862 100644
--- a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result
+++ b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result
@@ -4,56 +4,18 @@ 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 primary key);
-insert into t1 values (1);
-create table t2 (a int);
-insert into t2 values (1);
-update t1, t2 set t1.a = 0 where t1.a = t2.a;
-show tables;
-Tables_in_test
-t1
-select * from t1;
-a
-0
-drop table t1;
-insert into t1 values (1);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos 1153
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1146
-Last_Error Error 'Table 'test.t1' doesn't exist' on opening tables
-Skip_Counter 0
-Exec_Master_Log_Pos 941
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1146
-Last_SQL_Error Error 'Table 'test.t1' doesn't exist' on opening tables
-drop table t1, t2;
+==== Setup table on master but not on slave ====
+[on master]
+CREATE TABLE t1 (a INT);
+[on slave]
+DROP TABLE t1;
+==== Modify table on master ====
+[on master]
+INSERT INTO t1 VALUES (1);
+==== Verify error on slave ====
+[on slave]
+Last_SQL_Error = Error 'Table 'test.t1' doesn't exist' on opening tables
+==== Clean up ====
+include/stop_slave.inc
+[on master]
+DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_row_loaddata_m.result b/mysql-test/suite/rpl/r/rpl_row_loaddata_m.result
index 149efddaf8d..198e55c71d0 100644
--- a/mysql-test/suite/rpl/r/rpl_row_loaddata_m.result
+++ b/mysql-test/suite/rpl/r/rpl_row_loaddata_m.result
@@ -9,7 +9,7 @@ stop slave;
create database mysqltest;
use mysqltest;
create table t1(a int, b int, unique(b));
-load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
+load data infile '../../std_data/rpl_loaddata.dat' into table t1;
show binlog events from 102;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # #
diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result
index c0d70bb0cdd..b76cc6aa15e 100644
--- a/mysql-test/suite/rpl/r/rpl_row_log.result
+++ b/mysql-test/suite/rpl/r/rpl_row_log.result
@@ -4,7 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-stop slave;
+include/stop_slave.inc
reset master;
reset slave;
start slave;
@@ -12,7 +12,7 @@ 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)ENGINE=MyISAM;
-load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines;
+load data infile 'LOAD_FILE' into table t1 ignore 1 lines;
select count(*) from t1;
count(*)
69
@@ -113,10 +113,6 @@ Aberdeen
Abernathy
aberrant
aberration
-
-let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ;
-
---source include/wait_slave_status.inc
select * from t1 order by 1 asc;
word
Aarhus
@@ -189,7 +185,8 @@ Abernathy
aberrant
aberration
flush logs;
-stop slave;
+include/stop_slave.inc
+include/start_slave.inc
create table t2 (n int)ENGINE=MyISAM;
insert into t2 values (1);
show binlog events from <binlog_start>;
@@ -217,13 +214,12 @@ master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000002 # Query 1 # use `test`; COMMIT
show binary logs;
Log_name File_size
-master-bin.000001 1540
-master-bin.000002 516
-start slave;
+master-bin.000001 #
+master-bin.000002 #
show binary logs;
Log_name File_size
-slave-bin.000001 1638
-slave-bin.000002 417
+slave-bin.000001 #
+slave-bin.000002 #
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
@@ -292,13 +288,23 @@ ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find tar
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
+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 auto_increment primary key, b int);
insert into t1 values (NULL, 1);
-reset master;
set insert_id=5;
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int)
+master-bin.000001 # Query # # use `test`; BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # use `test`; COMMIT
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
diff --git a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result
index 790038799c0..809c50e1465 100644
--- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result
@@ -4,7 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-stop slave;
+include/stop_slave.inc
reset master;
reset slave;
start slave;
@@ -12,7 +12,7 @@ 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_ln/words.dat' into table t1 ignore 1 lines;
+load data infile 'LOAD_FILE' into table t1 ignore 1 lines;
select count(*) from t1;
count(*)
69
@@ -113,10 +113,6 @@ Aberdeen
Abernathy
aberrant
aberration
-
-let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ;
-
---source include/wait_slave_status.inc
select * from t1 order by 1 asc;
word
Aarhus
@@ -189,7 +185,8 @@ Abernathy
aberrant
aberration
flush logs;
-stop slave;
+include/stop_slave.inc
+include/start_slave.inc
create table t2 (n int)ENGINE=InnoDB;
insert into t2 values (1);
show binlog events from <binlog_start>;
@@ -217,13 +214,12 @@ master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000002 # Xid 1 # COMMIT /* XID */
show binary logs;
Log_name File_size
-master-bin.000001 1456
-master-bin.000002 474
-start slave;
+master-bin.000001 #
+master-bin.000002 #
show binary logs;
Log_name File_size
-slave-bin.000001 1536
-slave-bin.000002 366
+slave-bin.000001 #
+slave-bin.000002 #
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
@@ -292,13 +288,23 @@ ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find tar
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
+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 auto_increment primary key, b int);
insert into t1 values (NULL, 1);
-reset master;
set insert_id=5;
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int)
+master-bin.000001 # Query # # use `test`; BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # use `test`; COMMIT
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
diff --git a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
index 392f5904233..2215b34814e 100644
--- a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
+++ b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
@@ -1,5 +1,3 @@
-SET SESSION BINLOG_FORMAT=ROW;
-SET GLOBAL BINLOG_FORMAT=ROW;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
index 2d9d801047b..2cb316c6a1f 100644
--- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
+++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
@@ -159,7 +159,7 @@ ROLLBACK/*!*/;
use test/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -181,7 +181,7 @@ ROLLBACK/*!*/;
use test/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -290,7 +290,7 @@ ROLLBACK/*!*/;
use test/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -321,7 +321,7 @@ ROLLBACK/*!*/;
use test/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/rpl/r/rpl_row_mystery22.result b/mysql-test/suite/rpl/r/rpl_row_mystery22.result
deleted file mode 100644
index 5e42a89d741..00000000000
--- a/mysql-test/suite/rpl/r/rpl_row_mystery22.result
+++ /dev/null
@@ -1,32 +0,0 @@
-stop slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-reset master;
-reset slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-start slave;
-create table t1(n int auto_increment primary key, s char(10));
-set @@global.slave_exec_mode= 'IDEMPOTENT';
-insert into t1 values (2,'old');
-insert into t1 values(NULL,'new');
-insert into t1 values(NULL,'new');
-select * from t1 order by n;
-n s
-1 new
-2 new
-delete from t1 where n = 2;
-start slave;
-stop slave;
-create table t2(n int);
-drop table t2;
-insert into t1 values(NULL,'new');
-set sql_log_bin=0;
-insert into t1 values(NULL,'new');
-set sql_log_bin=1;
-delete from t1 where n=4;
-start slave;
-select * from t1 order by n;
-n s
-1 new
-3 new
-drop table t1;
-set @@global.slave_exec_mode= default;
diff --git a/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result b/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result
index 0fd4ff86893..1934b01505c 100644
--- a/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result
+++ b/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result
@@ -5,7 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1 (words varchar(20)) engine=myisam;
-load data infile '../std_data_ln/words.dat' into table t1 (words);
+load data infile '../../std_data/words.dat' into table t1 (words);
select count(*) from t1;
count(*)
70
@@ -13,4 +13,5 @@ select count(*) from t1;
count(*)
70
drop table t1;
+include/stop_slave.inc
drop table t1;
diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
index e81d4f7454e..a6a2181cd2a 100644
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
@@ -140,7 +140,7 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
+Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1364
Last_SQL_Error <Last_SQL_Error>
@@ -191,7 +191,7 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
+Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 0
Last_SQL_Error <Last_SQL_Error>
@@ -232,7 +232,7 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
+Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1535
Last_SQL_Error <Last_SQL_Error>
@@ -275,7 +275,7 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
+Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1535
Last_SQL_Error <Last_SQL_Error>
@@ -318,7 +318,7 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
+Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1535
Last_SQL_Error <Last_SQL_Error>
@@ -360,7 +360,7 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
+Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 0
Last_SQL_Error <Last_SQL_Error>
diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
index a6834be5a86..02e8c074354 100644
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
@@ -140,7 +140,7 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
+Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1364
Last_SQL_Error <Last_SQL_Error>
@@ -191,7 +191,7 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
+Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 0
Last_SQL_Error <Last_SQL_Error>
@@ -232,7 +232,7 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
+Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1535
Last_SQL_Error <Last_SQL_Error>
@@ -275,7 +275,7 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
+Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1535
Last_SQL_Error <Last_SQL_Error>
@@ -318,7 +318,7 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
+Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1535
Last_SQL_Error <Last_SQL_Error>
@@ -360,7 +360,7 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
+Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 0
Last_SQL_Error <Last_SQL_Error>
diff --git a/mysql-test/suite/rpl/r/rpl_row_until.result b/mysql-test/suite/rpl/r/rpl_row_until.result
index f544ef95702..be1ec51f74a 100644
--- a/mysql-test/suite/rpl/r/rpl_row_until.result
+++ b/mysql-test/suite/rpl/r/rpl_row_until.result
@@ -4,7 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-stop slave;
+include/stop_slave.inc
create table t1(n int not null auto_increment primary key);
insert into t1 values (1),(2),(3),(4);
drop table t1;
@@ -149,8 +149,8 @@ Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave;
-stop slave;
-start slave until master_log_file='master-bin.000001', master_log_pos=740;
+include/stop_slave.inc
+start slave sql_thread until master_log_file='master-bin.000001', master_log_pos=740;
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
@@ -162,7 +162,7 @@ Read_Master_Log_Pos 1161
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
+Slave_IO_Running No
Slave_SQL_Running No
Replicate_Do_DB
Replicate_Ignore_DB
@@ -200,7 +200,7 @@ start slave until relay_log_file='slave-relay-bin.000002';
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
-start slave sql_thread;
+start slave;
start slave until master_log_file='master-bin.000001', master_log_pos=740;
Warnings:
Note 1254 Slave is already running
diff --git a/mysql-test/suite/rpl/r/rpl_server_id1.result b/mysql-test/suite/rpl/r/rpl_server_id1.result
index 724f0071e07..76f187e3b01 100644
--- a/mysql-test/suite/rpl/r/rpl_server_id1.result
+++ b/mysql-test/suite/rpl/r/rpl_server_id1.result
@@ -5,7 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
reset master;
-stop slave;
+include/stop_slave.inc
change master to master_port=SLAVE_PORT;
start slave;
*** must be having the replicate-same-server-id IO thread error ***
diff --git a/mysql-test/suite/rpl/r/rpl_server_id2.result b/mysql-test/suite/rpl/r/rpl_server_id2.result
index f68f9ff829d..bb5a175fbfe 100644
--- a/mysql-test/suite/rpl/r/rpl_server_id2.result
+++ b/mysql-test/suite/rpl/r/rpl_server_id2.result
@@ -8,45 +8,6 @@ create table t1 (n int);
reset master;
stop slave;
change master to master_port=SLAVE_PORT;
-show slave status;
-Slave_IO_State
-Master_Host 127.0.0.1
-Master_User root
-Master_Port SLAVE_PORT
-Connect_Retry 1
-Master_Log_File
-Read_Master_Log_Pos 4
-Relay_Log_File slave-relay-bin.000001
-Relay_Log_Pos 4
-Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table #
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 0
-Relay_Log_Space 106
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master NULL
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
start slave;
insert into t1 values (1);
select * from t1;
@@ -55,3 +16,15 @@ n
1
stop slave;
drop table t1;
+reset master;
+create table t1(n int);
+create table t2(n int);
+change master to master_port=MASTER_PORT;
+start slave until master_log_file='master-bin.000001', master_log_pos=UNTIL_POS;
+*** checking until postion execution: must be only t1 in the list ***
+show tables;
+Tables_in_test
+t1
+start slave sql_thread;
+drop table t1;
+drop table t2;
diff --git a/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result b/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result
new file mode 100644
index 00000000000..eb3c4ef5978
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result
@@ -0,0 +1,123 @@
+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;
+
+*** Preparing data ***
+CREATE TABLE t1 (a INT NOT NULL, b VARCHAR(10)) ENGINE=MyISAM;
+CREATE TABLE t2 LIKE t1;
+CREATE TABLE t3 LIKE t1;
+CREATE TRIGGER tr1 BEFORE UPDATE ON t1
+FOR EACH ROW BEGIN
+UPDATE t2 SET b='YY' WHERE a=NEW.a;
+END|
+CREATE TRIGGER tr2 AFTER UPDATE ON t1
+FOR EACH ROW BEGIN
+UPDATE t3 SET b='ZZ' WHERE a=NEW.a;
+END|
+
+*** Test non-transactional group w/o PK ***
+INSERT INTO t3 VALUES(1, 'AA');
+INSERT INTO t2 VALUES(1, 'AA');
+INSERT INTO t1 VALUES(1, 'AA');
+RENAME TABLE t3 TO t3_bak;
+UPDATE t1 SET b = 'XX' WHERE a = 1;
+SELECT * FROM t1 ORDER BY a;
+a b
+1 XX
+SELECT * FROM t2 ORDER BY a;
+a b
+1 YY
+SELECT * FROM t3 ORDER BY a;
+a b
+1 ZZ
+SHOW TABLES LIKE 't%';
+Tables_in_test (t%)
+t1
+t2
+t3_bak
+SELECT * FROM t1 ORDER BY a;
+a b
+1 AA_for_row_or_XX_for_stmt_mixed
+SELECT * FROM t2 ORDER BY a;
+a b
+1 AA_for_row_or_YY_for_stmt_mixed
+include/stop_slave.inc
+RENAME TABLE t3_bak TO t3;
+include/start_slave.inc
+TRUNCATE t1;
+TRUNCATE t2;
+TRUNCATE t3;
+
+*** Test non-transactional group w/ PK ***
+ALTER TABLE t1 ADD PRIMARY KEY (a);
+ALTER TABLE t2 ADD PRIMARY KEY (a);
+ALTER TABLE t3 ADD PRIMARY KEY (a);
+RENAME TABLE t3 TO t3_bak;
+INSERT INTO t3 VALUES(2, 'B');
+INSERT INTO t2 VALUES(2, 'B');
+INSERT INTO t1 VALUES(2, 'B');
+UPDATE t1 SET b = 'X' WHERE a = 2;
+SELECT * FROM t1 ORDER BY a;
+a b
+2 X
+SELECT * FROM t2 ORDER BY a;
+a b
+2 YY
+SELECT * FROM t3 ORDER BY a;
+a b
+2 ZZ
+SHOW TABLES LIKE 't%';
+Tables_in_test (t%)
+t1
+t2
+t3_bak
+SELECT * FROM t1 ORDER BY a;
+a b
+SELECT * FROM t2 ORDER BY a;
+a b
+include/stop_slave.inc
+RENAME TABLE t3_bak TO t3;
+include/start_slave.inc
+TRUNCATE t1;
+TRUNCATE t2;
+TRUNCATE t3;
+
+*** Test transactional group w/ PK ***
+ALTER TABLE t1 ENGINE=InnoDB;
+ALTER TABLE t2 ENGINE=InnoDB;
+ALTER TABLE t3 ENGINE=InnoDB;
+RENAME TABLE t3 TO t3_bak;
+BEGIN;
+INSERT INTO t1 VALUES (3, 'C'), (4, 'D');
+INSERT INTO t2 VALUES (3, 'C'), (4, 'D');
+INSERT INTO t3 VALUES (3, 'C'), (4, 'D');
+COMMIT;
+SELECT * FROM t1 ORDER BY a;
+a b
+3 C
+4 D
+SELECT * FROM t2 ORDER BY a;
+a b
+3 C
+4 D
+SELECT * FROM t3 ORDER BY a;
+a b
+3 C
+4 D
+SHOW TABLES LIKE 't%';
+Tables_in_test (t%)
+t1
+t2
+t3_bak
+SELECT * FROM t1 ORDER BY a;
+a b
+SELECT * FROM t2 ORDER BY a;
+a b
+include/stop_slave.inc
+RENAME TABLE t3_bak TO t3;
+include/start_slave.inc
+*** Clean up ***
+DROP TABLE t1,t2,t3;
diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result
index bb03c3b6cca..747e8f235a8 100644
--- a/mysql-test/suite/rpl/r/rpl_slave_skip.result
+++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result
@@ -166,7 +166,7 @@ BEGIN
UPDATE t3 SET a =2, b = 'master only';
END|
**** On Slave ****
-STOP SLAVE;
+include/stop_slave.inc
**** On Master ****
UPDATE t1 SET a = 2, b = 'master only' WHERE a = 1;
DROP TRIGGER tr1;
@@ -174,6 +174,7 @@ DROP TRIGGER tr2;
INSERT INTO t1 VALUES (3,'master/slave');
INSERT INTO t2 VALUES (3,'master/slave');
INSERT INTO t3 VALUES (3,'master/slave');
+COMMIT;
SELECT * FROM t1 ORDER BY a;
a b
2 master only
@@ -188,7 +189,7 @@ a b
3 master/slave
*** On Slave ***
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
-START SLAVE;
+include/start_slave.inc
SELECT * FROM t1 ORDER BY a;
a b
1 master/slave
@@ -208,7 +209,7 @@ CREATE TABLE t4 (a INT, b VARCHAR(20)) ENGINE=innodb;
CREATE TABLE t5 (a INT, b VARCHAR(20)) ENGINE=innodb;
CREATE TABLE t6 (a INT, b VARCHAR(20)) ENGINE=innodb;
**** On Slave ****
-STOP SLAVE;
+include/stop_slave.inc
*** On Master ***
BEGIN;
INSERT INTO t4 VALUES (2, 'master only');
@@ -234,7 +235,7 @@ a b
3 master/slave
*** On Slave ***
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
-START SLAVE;
+include/start_slave.inc
SELECT * FROM t4 ORDER BY a;
a b
3 master/slave
@@ -245,7 +246,7 @@ SELECT * FROM t6 ORDER BY a;
a b
3 master/slave
**** On Slave ****
-STOP SLAVE;
+include/stop_slave.inc
*** On Master ***
BEGIN;
INSERT INTO t4 VALUES (6, 'master only');
@@ -277,7 +278,7 @@ a b
7 master only
*** On Slave ***
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=10;
-START SLAVE;
+include/start_slave.inc
SELECT * FROM t4 ORDER BY a;
a b
3 master/slave
@@ -287,7 +288,7 @@ a b
SELECT * FROM t6 ORDER BY a;
a b
3 master/slave
-STOP SLAVE;
+include/stop_slave.inc
SET AUTOCOMMIT=0;
INSERT INTO t4 VALUES (4, 'master only');
INSERT INTO t5 VALUES (4, 'master only');
@@ -323,7 +324,7 @@ a b
7 master only
*** On Slave ***
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
-START SLAVE;
+include/start_slave.inc
SELECT * FROM t4 ORDER BY a;
a b
3 master/slave
@@ -341,10 +342,10 @@ DROP TABLE t4, t5, t6;
*** On Master ***
CREATE TABLE t10 (a INT, b VARCHAR(20)) ENGINE=myisam;
*** On Slave ***
-STOP SLAVE;
+include/stop_slave.inc
*** On Master ***
SET SESSION BINLOG_FORMAT=STATEMENT;
-LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/rpl_bug28618.dat' INTO TABLE t10 FIELDS TERMINATED BY '|';
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_bug28618.dat' INTO TABLE t10 FIELDS TERMINATED BY '|';
SELECT * FROM t10 ORDER BY a;
a b
1 master only
@@ -352,7 +353,7 @@ a b
3 master only
*** On Slave ***
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
-START SLAVE;
+include/start_slave.inc
SELECT * FROM t10 ORDER BY a;
a b
DROP TABLE t10;
diff --git a/mysql-test/suite/rpl/r/rpl_slave_status.result b/mysql-test/suite/rpl/r/rpl_slave_status.result
index b435af499df..a98a81dc74f 100644
--- a/mysql-test/suite/rpl/r/rpl_slave_status.result
+++ b/mysql-test/suite/rpl/r/rpl_slave_status.result
@@ -6,31 +6,30 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
==== Create new replication user ====
[on master]
-grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl';
+GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY 'rpl';
[on slave]
-stop slave;
-change master to master_user='rpl',master_password='rpl';
-start slave;
+include/stop_slave.inc
+CHANGE MASTER TO master_user='rpl', master_password='rpl';
+include/start_slave.inc
==== Do replication as new user ====
[on master]
-create table t1 (n int);
-insert into t1 values (1);
+CREATE TABLE t1 (n INT);
+INSERT INTO t1 VALUES (1);
[on slave]
-select * from t1;
+SELECT * FROM t1;
n
1
==== Delete new replication user ====
[on master]
-drop user rpl@127.0.0.1;
-flush privileges;
+DROP USER rpl@127.0.0.1;
+FLUSH PRIVILEGES;
[on slave]
==== Restart slave without privileges =====
-stop slave;
-start slave;
+include/stop_slave.inc
+START SLAVE;
==== Verify that Slave_IO_Running = No ====
Slave_IO_Running = No (should be No)
==== Cleanup (Note that slave IO thread is not running) ====
-drop table t1;
-delete from mysql.user where user='rpl';
+DROP TABLE t1;
[on master]
-drop table t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result
index 3ca4f86cf64..4a8a4050c02 100644
--- a/mysql-test/suite/rpl/r/rpl_sp.result
+++ b/mysql-test/suite/rpl/r/rpl_sp.result
@@ -191,11 +191,15 @@ begin
return unix_timestamp();
end|
ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
+set @old_log_bin_trust_routine_creators= @@global.log_bin_trust_routine_creators;
+set @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
set global log_bin_trust_routine_creators=1;
Warnings:
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
set global log_bin_trust_function_creators=0;
set global log_bin_trust_function_creators=1;
+set @old_log_bin_trust_routine_creators= @@global.log_bin_trust_routine_creators;
+set @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
set global log_bin_trust_function_creators=1;
create function fn2()
returns int
@@ -549,8 +553,14 @@ insert into t values (1);
return 0;
end
master-bin.000001 # Query 1 # use `mysqltest`; SELECT `mysqltest2`.`f1`()
-set global log_bin_trust_function_creators=0;
-set global log_bin_trust_function_creators=0;
+set @@global.log_bin_trust_routine_creators= @old_log_bin_trust_routine_creators;
+Warnings:
+Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
+set @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
+set @@global.log_bin_trust_routine_creators= @old_log_bin_trust_routine_creators;
+Warnings:
+Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
+set @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
drop database mysqltest;
drop database mysqltest2;
use test;
@@ -605,7 +615,7 @@ DELIMITER /*!*/;
ROLLBACK/*!*/;
SET TIMESTAMP=t/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/rpl/r/rpl_sp_effects.result b/mysql-test/suite/rpl/r/rpl_sp_effects.result
index a39d189aa3a..d9cdfd81167 100644
--- a/mysql-test/suite/rpl/r/rpl_sp_effects.result
+++ b/mysql-test/suite/rpl/r/rpl_sp_effects.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
drop procedure if exists p1;
drop procedure if exists p2;
drop function if exists f1;
@@ -275,5 +276,5 @@ E
drop table t2;
drop procedure sp_bug26199;
drop function sf_bug26199;
-SET GLOBAL log_bin_trust_function_creators = 0;
+SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
end of the tests
diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result
index 3b4cd05f640..24e454eb876 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_000001.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result
@@ -5,7 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1 (word char(20) not null);
-load data infile '../std_data_ln/words.dat' into table t1;
+load data infile '../../std_data/words.dat' into table t1;
load data local infile 'MYSQL_TEST_DIR/std_data/words.dat' into table t1;
select * from t1 limit 10;
word
diff --git a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result
index 13aa45d8ced..e69952787fb 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result
@@ -11,3 +11,6 @@ set sql_log_bin=1;
insert into t1 values(1),(2);
ERROR 23000: Duplicate entry '2' for key 'a'
drop table t1;
+Error: "Query caused different errors on master and slave. Error on master: 'Duplicate entry '%-.192s' for key %d' (1062), Error on slave: 'no error' (0). Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
+Errno: "0" (expected 0)
+drop table t1;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_conflicts.result b/mysql-test/suite/rpl/r/rpl_stm_conflicts.result
new file mode 100644
index 00000000000..b0df9516b7c
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_stm_conflicts.result
@@ -0,0 +1,54 @@
+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;
+==== Initialize ====
+[on master]
+CREATE TABLE t1(a INT PRIMARY KEY);
+[on slave]
+==== Test: SQL thread sees 'INSERT' of existing key ====
+---- Prepare slave so that it will get duplicate key error ----
+INSERT INTO t1 VALUES (1);
+---- Insert rows on master ----
+[on master]
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1;
+a
+1
+[on slave]
+---- Wait until slave stops with an error ----
+Last_SQL_Error = Error 'Duplicate entry '1' for key 'PRIMARY'' on query. Default database: 'test'. Query: 'INSERT INTO t1 VALUES (1)' (expected "duplicate key" error)
+SELECT * FROM t1;
+a
+1
+---- Resolve the conflict on the slave and restart SQL thread ----
+DELETE FROM t1 WHERE a = 1;
+START SLAVE SQL_THREAD;
+---- Sync slave and verify that there is no error ----
+Last_SQL_Error = '' (expected no error)
+SELECT * FROM t1;
+a
+1
+==== Test: SQL thread sees 'DELETE' of non-existing row ====
+---- On master, insert two rows, the second with binlogging off ----
+[on master]
+DELETE FROM t1;
+INSERT INTO t1 VALUES (1);
+[on slave]
+DELETE FROM t1 WHERE a = 1;
+---- On master, remove the row that does not exist on slave ----
+[on master]
+DELETE FROM t1 WHERE a = 1;
+SELECT * FROM t1;
+a
+[on slave]
+---- Sync slave and verify that there is no error ----
+Last_SQL_Error = (expected no error)
+SELECT * FROM t1;
+a
+==== Clean up ====
+[on master]
+DROP TABLE t1;
+[on slave]
diff --git a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
index bc14c443f48..ea2a9ce9a79 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
@@ -30,4 +30,5 @@ flush tables with read lock;
start slave;
stop slave;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+unlock tables;
drop table t3, t4, t5;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result
index 20f8e04afe7..715d4976a95 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_log.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_log.result
@@ -4,7 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-stop slave;
+include/stop_slave.inc
reset master;
reset slave;
start slave;
@@ -12,7 +12,7 @@ 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)ENGINE=MyISAM;
-load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines;
+load data infile 'LOAD_FILE' into table t1 ignore 1 lines;
select count(*) from t1;
count(*)
69
@@ -25,7 +25,7 @@ master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
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=MyISAM
master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
-master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1
+master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=1
show binlog events from 106 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=MyISAM
@@ -109,10 +109,6 @@ Aberdeen
Abernathy
aberrant
aberration
-
-let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ;
-
---source include/wait_slave_status.inc
select * from t1 order by 1 asc;
word
Aarhus
@@ -185,7 +181,8 @@ Abernathy
aberrant
aberration
flush logs;
-stop slave;
+include/stop_slave.inc
+include/start_slave.inc
create table t2 (n int)ENGINE=MyISAM;
insert into t2 values (1);
show binlog events from <binlog_start>;
@@ -196,7 +193,7 @@ master-bin.000001 # Query # # use `test`; insert into t1 values (NULL)
master-bin.000001 # Query # # use `test`; drop table t1
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
-master-bin.000001 # Execute_load_query # # use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=#
+master-bin.000001 # Execute_load_query # # use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=#
master-bin.000001 # Rotate # # master-bin.000002;pos=4
show binlog events in 'master-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info
@@ -206,13 +203,12 @@ master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM
master-bin.000002 # Query 1 # use `test`; insert into t2 values (1)
show binary logs;
Log_name File_size
-master-bin.000001 1347
-master-bin.000002 392
-start slave;
+master-bin.000001 #
+master-bin.000002 #
show binary logs;
Log_name File_size
-slave-bin.000001 1447
-slave-bin.000002 293
+slave-bin.000001 #
+slave-bin.000002 #
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
@@ -222,7 +218,7 @@ slave-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
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=MyISAM
slave-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
-slave-bin.000001 # Execute_load_query 1 # use `test`; load data INFILE '../tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1
+slave-bin.000001 # Execute_load_query 1 # use `test`; load data INFILE '../../tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1
slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM
slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
show binlog events in 'slave-bin.000002' from 4;
@@ -274,13 +270,21 @@ ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find tar
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
+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 auto_increment primary key, b int);
insert into t1 values (NULL, 1);
-reset master;
set insert_id=5;
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int)
+master-bin.000001 # Intvar # # INSERT_ID=1
+master-bin.000001 # Query # # use `test`; insert into t1 values (NULL, 1)
master-bin.000001 # Intvar # # LAST_INSERT_ID=1
master-bin.000001 # Intvar # # INSERT_ID=5
master-bin.000001 # Query # # use `test`; insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id())
diff --git a/mysql-test/suite/rpl/r/rpl_stm_mystery22.result b/mysql-test/suite/rpl/r/rpl_stm_mystery22.result
deleted file mode 100644
index ea34b308ec2..00000000000
--- a/mysql-test/suite/rpl/r/rpl_stm_mystery22.result
+++ /dev/null
@@ -1,31 +0,0 @@
-stop slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-reset master;
-reset slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-start slave;
-create table t1(n int auto_increment primary key, s char(10));
-insert into t1 values (2,'old');
-insert into t1 values(NULL,'new');
-insert into t1 values(NULL,'new');
-select * from t1 order by n;
-n s
-1 new
-2 old
-delete from t1 where n = 2;
-start slave;
-stop slave;
-create table t2(n int);
-drop table t2;
-insert into t1 values(NULL,'new');
-set sql_log_bin=0;
-insert into t1 values(NULL,'new');
-set sql_log_bin=1;
-delete from t1 where n=4;
-start slave;
-select * from t1 order by n;
-n s
-1 new
-2 new
-3 new
-drop table t1;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_until.result b/mysql-test/suite/rpl/r/rpl_stm_until.result
index 619115aa534..55074f0be0d 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_until.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_until.result
@@ -4,7 +4,10 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-stop slave;
+[on slave]
+include/stop_slave.inc
+==== Create some events on master ====
+[on master]
create table t1(n int not null auto_increment primary key);
insert into t1 values (1),(2),(3),(4);
drop table t1;
@@ -12,6 +15,8 @@ create table t2(n int not null auto_increment primary key);
insert into t2 values (1),(2);
insert into t2 values (3),(4);
drop table t2;
+==== Replicate one event at a time on slave ====
+[on slave]
start slave until master_log_file='master-bin.000001', master_log_pos=323;
select * from t1;
n
@@ -149,7 +154,9 @@ Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave;
-stop slave;
+[on master]
+[on slave]
+include/stop_slave.inc
start slave until master_log_file='master-bin.000001', master_log_pos=776;
SHOW SLAVE STATUS;
Slave_IO_State #
@@ -190,6 +197,7 @@ Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
+==== Test various error conditions ====
start slave until master_log_file='master-bin', master_log_pos=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
diff --git a/mysql-test/suite/rpl/r/rpl_temporary.result b/mysql-test/suite/rpl/r/rpl_temporary.result
index d8fea78ecb4..568d5368adb 100644
--- a/mysql-test/suite/rpl/r/rpl_temporary.result
+++ b/mysql-test/suite/rpl/r/rpl_temporary.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+call mtr.add_suppression("Slave: Can\'t find record in \'user\' Error_code: 1032");
reset master;
SET @save_select_limit=@@session.sql_select_limit;
SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100;
diff --git a/mysql-test/suite/rpl/r/rpl_temporary_errors.result b/mysql-test/suite/rpl/r/rpl_temporary_errors.result
index 430e63c5859..d14380a6369 100644
--- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result
+++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+call mtr.add_suppression("Deadlock found");
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
diff --git a/mysql-test/suite/rpl/r/rpl_timezone.result b/mysql-test/suite/rpl/r/rpl_timezone.result
index cd71dbe628e..927756dd530 100644
--- a/mysql-test/suite/rpl/r/rpl_timezone.result
+++ b/mysql-test/suite/rpl/r/rpl_timezone.result
@@ -42,7 +42,7 @@ t n
2004-06-11 09:39:02 6
delete from t1;
set time_zone='UTC';
-load data infile '../std_data_ln/rpl_timezone2.dat' into table t1;
+load data infile '../../std_data/rpl_timezone2.dat' into table t1;
Warnings:
Warning 1265 Data truncated for column 't' at row 1
Warning 1261 Row 1 doesn't contain data for all columns
diff --git a/mysql-test/suite/rpl/r/rpl_trigger.result b/mysql-test/suite/rpl/r/rpl_trigger.result
index 68c82ed037f..3d7757613a7 100644
--- a/mysql-test/suite/rpl/r/rpl_trigger.result
+++ b/mysql-test/suite/rpl/r/rpl_trigger.result
@@ -862,6 +862,9 @@ drop table t21,t31;
drop table t11;
STOP SLAVE;
FLUSH LOGS;
+--> Stop master server
+--> Start master server
+--> Master binlog: Server ver: 5.0.16-debug-log, Binlog ver: 4
RESET SLAVE;
START SLAVE;
SELECT MASTER_POS_WAIT('master-bin.000001', 513) >= 0;
@@ -975,3 +978,22 @@ a b
2 b
3 c
drop table 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;
+create table t1 ( f int ) engine = innodb;
+create table log ( r int ) engine = myisam;
+create trigger tr
+after insert on t1
+for each row insert into log values ( new.f );
+set autocommit = 0;
+insert into t1 values ( 1 );
+rollback;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+Comparing tables master:test.t1 and slave:test.t1
+Comparing tables master:test.log and slave:test.log
+drop table t1, log;
diff --git a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result
index 1ae98706975..92e13064856 100644
--- a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result
@@ -10,6 +10,8 @@ DROP TABLE IF EXISTS t1;
RESET SLAVE;
START SLAVE;
**** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
SET SESSION BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
@@ -42,12 +44,16 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Query # # use `test`; DROP TABLE t1
RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
STOP SLAVE;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
RESET SLAVE;
START SLAVE;
**** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
@@ -80,12 +86,16 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Query # # use `test`; DROP TABLE t1
RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
STOP SLAVE;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
RESET SLAVE;
START SLAVE;
**** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
@@ -121,12 +131,16 @@ master-bin.000001 # Query # # use `test`; COMMIT
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Query # # use `test`; DROP TABLE t1
RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
STOP SLAVE;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
RESET SLAVE;
START SLAVE;
**** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
SET SESSION BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
@@ -159,12 +173,16 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 # Query # # use `test`; DELETE FROM t1
master-bin.000001 # Query # # use `test`; DROP TABLE t1
RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
STOP SLAVE;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
RESET SLAVE;
START SLAVE;
**** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
@@ -197,12 +215,16 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 # Query # # use `test`; DELETE FROM t1
master-bin.000001 # Query # # use `test`; DROP TABLE t1
RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
STOP SLAVE;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
RESET SLAVE;
START SLAVE;
**** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
@@ -242,3 +264,5 @@ master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE t1
RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
diff --git a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result
index 728b8450314..94461c33c46 100644
--- a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result
@@ -10,6 +10,8 @@ DROP TABLE IF EXISTS t1;
RESET SLAVE;
START SLAVE;
**** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
SET SESSION BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
@@ -46,12 +48,16 @@ master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE t1
RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
STOP SLAVE;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
RESET SLAVE;
START SLAVE;
**** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
@@ -88,12 +94,16 @@ master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE t1
RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
STOP SLAVE;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
RESET SLAVE;
START SLAVE;
**** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
@@ -131,12 +141,16 @@ master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE t1
RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
STOP SLAVE;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
RESET SLAVE;
START SLAVE;
**** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
SET SESSION BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
@@ -173,12 +187,16 @@ master-bin.000001 # Query # # use `test`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE t1
RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
STOP SLAVE;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
RESET SLAVE;
START SLAVE;
**** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
@@ -215,12 +233,16 @@ master-bin.000001 # Query # # use `test`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE t1
RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
STOP SLAVE;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
RESET SLAVE;
START SLAVE;
**** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
@@ -260,3 +282,5 @@ master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE t1
RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
diff --git a/mysql-test/suite/rpl/r/rpl_variables.result b/mysql-test/suite/rpl/r/rpl_variables.result
index 902340f0219..b3108c75a6e 100644
--- a/mysql-test/suite/rpl/r/rpl_variables.result
+++ b/mysql-test/suite/rpl/r/rpl_variables.result
@@ -40,10 +40,10 @@ SET @user_num = 10;
SET @user_text = 'Alunda';
[on master]
**** Resetting master and slave ****
-STOP SLAVE;
+include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
-START SLAVE;
+include/start_slave.inc
[on slave]
SET @@global.init_slave = 'SELECT 1';
[on master]