summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@sun.com>2010-03-10 00:07:33 +0000
committerLuis Soares <luis.soares@sun.com>2010-03-10 00:07:33 +0000
commit6d701d3e9cf7d426967962feaa3c6dced62aee24 (patch)
tree12afb97aa0091158bb3aa57c8bc9015c040cd33d
parentd58532247457b436e562aa8b49c75e4bfaaae8bf (diff)
parent4dbcac20b4666f040481fdae7b3bff3180721570 (diff)
downloadmariadb-git-6d701d3e9cf7d426967962feaa3c6dced62aee24.tar.gz
Automerge: bzr bundle (post-push fix) in bug report --> mysql-5.1-bugteam-pp-fix
-rw-r--r--mysql-test/suite/binlog/r/binlog_innodb_row.result29
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_innodb_truncate.result28
-rw-r--r--mysql-test/suite/binlog/t/binlog_innodb_row.test37
-rw-r--r--mysql-test/suite/binlog/t/binlog_row_innodb_truncate.test37
4 files changed, 66 insertions, 65 deletions
diff --git a/mysql-test/suite/binlog/r/binlog_innodb_row.result b/mysql-test/suite/binlog/r/binlog_innodb_row.result
index f7415610dc5..4e64660abf8 100644
--- a/mysql-test/suite/binlog/r/binlog_innodb_row.result
+++ b/mysql-test/suite/binlog/r/binlog_innodb_row.result
@@ -29,3 +29,32 @@ master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
drop table t1;
+RESET MASTER;
+CREATE TABLE t1 ( c1 int , primary key (c1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1), (2), (3);
+CREATE TEMPORARY TABLE IF NOT EXISTS t2 LIKE t1;
+TRUNCATE TABLE t2;
+DROP TABLE t1;
+###############################################
+### assertion: No event for 'TRUNCATE TABLE t2'
+###############################################
+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 ( c1 int , primary key (c1)) ENGINE=InnoDB
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `test`; DROP TABLE t1
+###############################################
+RESET MASTER;
+CREATE TEMPORARY TABLE t1 (c1 int) Engine=InnoDB;
+INSERT INTO t1 VALUES (1), (2), (3);
+TRUNCATE t1;
+DROP TEMPORARY TABLE t1;
+###############################################
+### assertion: No event for 'TRUNCATE TABLE t1'
+###############################################
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+###############################################
diff --git a/mysql-test/suite/binlog/r/binlog_row_innodb_truncate.result b/mysql-test/suite/binlog/r/binlog_row_innodb_truncate.result
deleted file mode 100644
index 39f8b43f207..00000000000
--- a/mysql-test/suite/binlog/r/binlog_row_innodb_truncate.result
+++ /dev/null
@@ -1,28 +0,0 @@
-CREATE TABLE t1 ( c1 int , primary key (c1)) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1), (2), (3);
-CREATE TEMPORARY TABLE IF NOT EXISTS t2 LIKE t1;
-TRUNCATE TABLE t2;
-DROP TABLE t1;
-###############################################
-### assertion: No event for 'TRUNCATE TABLE t2'
-###############################################
-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 ( c1 int , primary key (c1)) ENGINE=InnoDB
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Xid # # COMMIT /* XID */
-master-bin.000001 # Query # # use `test`; DROP TABLE t1
-###############################################
-RESET MASTER;
-CREATE TEMPORARY TABLE t1 (c1 int) Engine=InnoDB;
-INSERT INTO t1 VALUES (1), (2), (3);
-TRUNCATE t1;
-DROP TEMPORARY TABLE t1;
-###############################################
-### assertion: No event for 'TRUNCATE TABLE t1'
-###############################################
-show binlog events from <binlog_start>;
-Log_name Pos Event_type Server_id End_log_pos Info
-###############################################
diff --git a/mysql-test/suite/binlog/t/binlog_innodb_row.test b/mysql-test/suite/binlog/t/binlog_innodb_row.test
index aaba98e3284..b491510c9c9 100644
--- a/mysql-test/suite/binlog/t/binlog_innodb_row.test
+++ b/mysql-test/suite/binlog/t/binlog_innodb_row.test
@@ -40,3 +40,40 @@ commit;
source include/show_binlog_events.inc;
drop table t1;
+
+#
+# BUG#51251
+#
+# The test case checks if truncating a temporary table created with
+# engine InnoDB will not cause the truncate statement to be binlogged.
+
+# Before patch for BUG#51251, the TRUNCATE statements below would be
+# binlogged, which would cause the slave to fail with "table does not
+# exist".
+
+RESET MASTER;
+
+CREATE TABLE t1 ( c1 int , primary key (c1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1), (2), (3);
+CREATE TEMPORARY TABLE IF NOT EXISTS t2 LIKE t1;
+TRUNCATE TABLE t2;
+DROP TABLE t1;
+
+-- echo ###############################################
+-- echo ### assertion: No event for 'TRUNCATE TABLE t2'
+-- echo ###############################################
+-- source include/show_binlog_events.inc
+-- echo ###############################################
+
+RESET MASTER;
+
+CREATE TEMPORARY TABLE t1 (c1 int) Engine=InnoDB;
+INSERT INTO t1 VALUES (1), (2), (3);
+TRUNCATE t1;
+DROP TEMPORARY TABLE t1;
+
+-- echo ###############################################
+-- echo ### assertion: No event for 'TRUNCATE TABLE t1'
+-- echo ###############################################
+-- source include/show_binlog_events.inc
+-- echo ###############################################
diff --git a/mysql-test/suite/binlog/t/binlog_row_innodb_truncate.test b/mysql-test/suite/binlog/t/binlog_row_innodb_truncate.test
deleted file mode 100644
index d7c177d4632..00000000000
--- a/mysql-test/suite/binlog/t/binlog_row_innodb_truncate.test
+++ /dev/null
@@ -1,37 +0,0 @@
--- source include/have_binlog_format_row.inc
--- source include/have_innodb.inc
-
-#
-# BUG#51251
-#
-# The test case checks if truncating a temporary table created with
-# engine InnoDB will not cause the truncate statement to be binlogged.
-
-# Before patch for BUG#51251, the TRUNCATE statements below would be
-# binlogged, which would cause the slave to fail with "table does not
-# exist".
-
-CREATE TABLE t1 ( c1 int , primary key (c1)) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1), (2), (3);
-CREATE TEMPORARY TABLE IF NOT EXISTS t2 LIKE t1;
-TRUNCATE TABLE t2;
-DROP TABLE t1;
-
--- echo ###############################################
--- echo ### assertion: No event for 'TRUNCATE TABLE t2'
--- echo ###############################################
--- source include/show_binlog_events.inc
--- echo ###############################################
-
-RESET MASTER;
-
-CREATE TEMPORARY TABLE t1 (c1 int) Engine=InnoDB;
-INSERT INTO t1 VALUES (1), (2), (3);
-TRUNCATE t1;
-DROP TEMPORARY TABLE t1;
-
--- echo ###############################################
--- echo ### assertion: No event for 'TRUNCATE TABLE t1'
--- echo ###############################################
--- source include/show_binlog_events.inc
--- echo ###############################################