summaryrefslogtreecommitdiff
path: root/mysql-test/extra/rpl_tests/rpl_insert_id.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/extra/rpl_tests/rpl_insert_id.test')
-rw-r--r--mysql-test/extra/rpl_tests/rpl_insert_id.test39
1 files changed, 14 insertions, 25 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_insert_id.test b/mysql-test/extra/rpl_tests/rpl_insert_id.test
index b542ff27231..565ab4a67ad 100644
--- a/mysql-test/extra/rpl_tests/rpl_insert_id.test
+++ b/mysql-test/extra/rpl_tests/rpl_insert_id.test
@@ -1,6 +1,4 @@
###########################################################
-# 2006-02-01: By JBM: Added 1022, ORDER BY
-###########################################################
# See if queries that use both auto_increment and LAST_INSERT_ID()
# are replicated well
############################################################
@@ -9,17 +7,10 @@
# column and index but without primary key.
##############################################################
-call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
-
--echo #
--echo # Setup
--echo #
-use test;
---disable_warnings
-drop table if exists t1, t2, t3;
---enable_warnings
-
--echo #
--echo # See if queries that use both auto_increment and LAST_INSERT_ID()
--echo # are replicated well
@@ -30,6 +21,13 @@ drop table if exists t1, t2, t3;
-- source include/master-slave.inc
#should work for both SBR and RBR
+--disable_query_log
+call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
+--connection slave
+call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
+--enable_query_log
+
+
# If concurrent inserts are on, it is not guaranteed that the rows
# inserted by INSERT are immediately accessible by SELECT in another
# thread. This would cause problems near the line 'connection master1'
@@ -44,9 +42,7 @@ eval create table t2(b int auto_increment, c int, key(b)) engine=$engine_type;
insert into t1 values (1),(2),(3);
insert into t1 values (null);
insert into t2 values (null,last_insert_id());
-save_master_pos;
-connection slave;
-sync_with_master;
+sync_slave_with_master;
select * from t1 ORDER BY a;
select * from t2 ORDER BY b;
connection master;
@@ -65,9 +61,7 @@ insert into t1 values (null),(null),(null);
insert into t2 values (5,0);
insert into t2 values (null,last_insert_id());
SET FOREIGN_KEY_CHECKS=1;
-save_master_pos;
-connection slave;
-sync_with_master;
+sync_slave_with_master;
select * from t1;
select * from t2;
connection master;
@@ -85,17 +79,13 @@ insert into t1 values (null),(null),(null);
insert into t2 values (5,0);
insert into t2 (c) select * from t1 ORDER BY a;
select * from t2 ORDER BY b;
-save_master_pos;
-connection slave;
-sync_with_master;
+sync_slave_with_master;
select * from t1 ORDER BY a;
select * from t2 ORDER BY b;
connection master;
drop table t1;
drop table t2;
-save_master_pos;
-connection slave;
-sync_with_master;
+sync_slave_with_master;
--echo #
--echo # Bug#8412: Error codes reported in binary log for CHARACTER SET,
@@ -215,9 +205,7 @@ call foo();
select * from t1;
select * from t2;
-save_master_pos;
-connection slave;
-sync_with_master;
+sync_slave_with_master;
select * from t1;
select * from t2;
connection master;
@@ -562,4 +550,5 @@ drop table t1, t2;
drop procedure foo;
SET @@global.concurrent_insert= @old_concurrent_insert;
set @@session.sql_auto_is_null=default;
-sync_slave_with_master;
+
+--source include/rpl_end.inc