List:Commits« Previous MessageNext Message »
From:Luis Soares Date:March 9 2010 11:41pm
Subject:bzr commit into mysql-5.1-bugteam branch (luis.soares:3384) Bug#51251
View as plain text  
#At file:///home/lsoares/Workspace/bzr/work/bugfixing/51251/mysql-5.1-bugteam-pp-fix/ based on revid:davi.arnaut@stripped

 3384 Luis Soares	2010-03-09
      Post-push fix for BUG#51251.
      
      The test case added in previous patch missed a RESET MASTER on
      test start up. Without it, showing binary log contents can
      sometimes show spurious entries from previously executed tests,
      ultimately causing test failure - result mismatch.
      
      The test file was added in:
      revid:luis.soares@stripped
      
      This patch also moves the test case into binlog_innodb_row.test
      file. This way we avoid having yet another test file,
      binlog_row_innodb_truncate.test, whose only purpose is to host
      one test case. This had been actually suggested during original
      patch review, but somehow the binlog_innodb_row was missed when
      searching for a file to host the test case.

    removed:
      mysql-test/suite/binlog/r/binlog_row_innodb_truncate.result
      mysql-test/suite/binlog/t/binlog_row_innodb_truncate.test
    modified:
      mysql-test/suite/binlog/r/binlog_innodb_row.result
      mysql-test/suite/binlog/t/binlog_innodb_row.test
=== modified file 'mysql-test/suite/binlog/r/binlog_innodb_row.result'
--- a/mysql-test/suite/binlog/r/binlog_innodb_row.result	2009-05-31 05:44:41 +0000
+++ b/mysql-test/suite/binlog/r/binlog_innodb_row.result	2010-03-09 23:41:21 +0000
@@ -29,3 +29,32 @@ master-bin.000001	#	Table_map	#	#	table_
 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
+###############################################

=== removed file 'mysql-test/suite/binlog/r/binlog_row_innodb_truncate.result'
--- a/mysql-test/suite/binlog/r/binlog_row_innodb_truncate.result	2010-02-24 19:01:53 +0000
+++ b/mysql-test/suite/binlog/r/binlog_row_innodb_truncate.result	1970-01-01 00:00:00 +0000
@@ -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
-###############################################

=== modified file 'mysql-test/suite/binlog/t/binlog_innodb_row.test'
--- a/mysql-test/suite/binlog/t/binlog_innodb_row.test	2008-12-08 15:07:08 +0000
+++ b/mysql-test/suite/binlog/t/binlog_innodb_row.test	2010-03-09 23:41:21 +0000
@@ -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 ###############################################

=== removed file 'mysql-test/suite/binlog/t/binlog_row_innodb_truncate.test'
--- a/mysql-test/suite/binlog/t/binlog_row_innodb_truncate.test	2010-02-24 19:01:53 +0000
+++ b/mysql-test/suite/binlog/t/binlog_row_innodb_truncate.test	1970-01-01 00:00:00 +0000
@@ -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 ###############################################


Attachment: [text/bzr-bundle] bzr/luis.soares@sun.com-20100309234121-ptn541xw8ftwo2qu.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (luis.soares:3384) Bug#51251Luis Soares10 Mar