Commit 8d43b845 authored by Mats Kindahl's avatar Mats Kindahl

BUG#36763: TRUNCATE TABLE fails to replicate when stmt-based binlogging is not supported.

Post-merge fixes. Changes to some result sets.

mysql-test/r/commit_1innodb.result:
  TRUNCATE TABLE does not cause the binary log to do commits any more.
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  TRUNCATE TABLE is not transactional, hence does not have BEGIN/COMMIT around itself.
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  TRUNCATE TABLE is not transactional, hence does not have BEGIN/COMMIT around itself.
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
  TRUNCATE TABLE is not transactional, hence does not have BEGIN/COMMIT around itself.
mysql-test/suite/rpl/r/rpl_truncate_2myisam.result:
  STOP SLAVE was replaced with include file.
mysql-test/suite/rpl/r/rpl_truncate_3innodb.result:
  STOP SLAVE was replaced with include file.
parent 8948cb62
......@@ -687,8 +687,8 @@ SUCCESS
truncate table t2;
call p_verify_status_increment(4, 0, 4, 0);
SUCCESS
ERROR
Expected commit increment: 4 actual: 2
commit;
# There is nothing left to commit
call p_verify_status_increment(0, 0, 0, 0);
......@@ -854,8 +854,8 @@ SUCCESS
truncate table t3;
call p_verify_status_increment(4, 4, 4, 4);
SUCCESS
ERROR
Expected commit increment: 4 actual: 2
create view v1 as select * from t2;
call p_verify_status_increment(1, 0, 1, 0);
SUCCESS
......
......@@ -379,9 +379,7 @@ 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 # Query # # use `test`; TRUNCATE table t2
master-bin.000001 # Xid # # COMMIT /* XID */
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
......@@ -401,9 +399,7 @@ 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`; ROLLBACK
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Query # # use `test`; TRUNCATE table t2
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
......
......@@ -346,9 +346,7 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (3,3)
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t2
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4,4)
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Query # # use `test`; TRUNCATE table t2
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5,5)
master-bin.000001 # Query # # use `test`; DROP TABLE t2
master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (6,6)
......@@ -356,9 +354,7 @@ master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE t2 (a int, b in
master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (7,7)
master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (8,8)
master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (9,9)
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Query # # use `test`; TRUNCATE table t2
master-bin.000001 # Query # # use `test`; COMMIT
master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (10,10)
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t2 values (100,100)
......
......@@ -963,9 +963,7 @@ master-bin.000001 # Xid 1 # #
master-bin.000001 # Query 1 # use `test_rpl`; BEGIN
master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
master-bin.000001 # Xid 1 # #
master-bin.000001 # Query 1 # use `test_rpl`; BEGIN
master-bin.000001 # Query 1 # use `test_rpl`; TRUNCATE t1
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
master-bin.000001 # Xid 1 # #
......
......@@ -5,10 +5,10 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
**** Resetting master and slave ****
STOP SLAVE;
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
START SLAVE;
include/start_slave.inc
**** On Master ****
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,1), (2,2);
......@@ -25,10 +25,10 @@ TRUNCATE TABLE t1;
Comparing tables master:test.t2 and slave:test.t2
DROP TABLE t1,t2;
**** Resetting master and slave ****
STOP SLAVE;
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
START SLAVE;
include/start_slave.inc
**** On Master ****
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,1), (2,2);
......
......@@ -5,10 +5,10 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
**** Resetting master and slave ****
STOP SLAVE;
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
START SLAVE;
include/start_slave.inc
**** On Master ****
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,1), (2,2);
......@@ -25,10 +25,10 @@ TRUNCATE TABLE t1;
Comparing tables master:test.t2 and slave:test.t2
DROP TABLE t1,t2;
**** Resetting master and slave ****
STOP SLAVE;
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
START SLAVE;
include/start_slave.inc
**** On Master ****
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,1), (2,2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment