List:Commits« Previous MessageNext Message »
From:Nirbhay Choubey Date:December 24 2011 9:48am
Subject:bzr push into mysql-5.5 branch (nirbhay.choubey:3665 to 3666) Bug#12809202
View as plain text  
 3666 Nirbhay Choubey	2011-12-24
      Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTION
                   --FLUSH-LOG BREAKS CONSISTENCY
      
      Post-fix for some failing tests.

    modified:
      client/mysqldump.c
      mysql-test/r/mysqldump.result
      mysql-test/t/mysqldump.test
 3665 Nirbhay Choubey	2011-12-23
      Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTION
                   --FLUSH-LOG BREAKS CONSISTENCY
      
      The transaction started by mysqldump gets committed
      implicitly when flush-log is specified along with
      single-transaction option, and hence can break
      consistency.
      
      This is because, COM_REFRESH is executed in order
      to flush logs and starting from 5.5 this command
      performs an implicit commit.
      
      Fixed by making sure that COM_REFRESH is executed
      before the transaction has started and not after it.
      
      Note : This patch triggers following behavioral
             changes in mysqldump :
      
      1) After this patch we no longer flush logs before
         dumping each database if --single-transaction
         option is given like it was done before (in the
         absence of --lock-all-tables and --master-data
         options).
      
      2) Also, after this patch, we start acquiring
         FTWRL before flushing logs in cases when only
         --single-transaction and --flush-logs are given.
         It becomes safe to use mysqldump with these two
         options and without --master-data parameter for
         backups.
     @ client/mysqldump.c
        Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTION
                     --FLUSH-LOG BREAKS CONSISTENCY
        
        Added logic to make sure that, if flush-log option
        is specified, mysql_refresh() is never executed after
        the transaction has started.
        
        Added verbose messages for all the executions of
        mysql_refresh() in order to track its invocation.
     @ mysql-test/r/mysqldump.result
        Added test case for Bug#12809202.
     @ mysql-test/t/mysqldump.test
        Added test case for Bug#12809202.

    modified:
      client/mysqldump.c
      mysql-test/r/mysqldump.result
      mysql-test/t/mysqldump.test
=== modified file 'client/mysqldump.c'
--- a/client/mysqldump.c	2011-12-23 17:35:00 +0000
+++ b/client/mysqldump.c	2011-12-24 09:38:59 +0000
@@ -562,6 +562,8 @@ static void verbose_msg(const char *fmt,
   vfprintf(stderr, fmt, args);
   va_end(args);
 
+  fflush(stderr);
+
   DBUG_VOID_RETURN;
 }
 

=== modified file 'mysql-test/r/mysqldump.result'
--- a/mysql-test/r/mysqldump.result	2011-12-23 17:35:00 +0000
+++ b/mysql-test/r/mysqldump.result	2011-12-24 09:38:59 +0000
@@ -4762,3 +4762,7 @@ UNLOCK TABLES;
 DROP TABLE b12809202_db.t1;
 DROP TABLE b12809202_db.t2;
 DROP DATABASE b12809202_db;
+#
+# Delete all existing binary logs.
+#
+RESET MASTER;

=== modified file 'mysql-test/t/mysqldump.test'
--- a/mysql-test/t/mysqldump.test	2011-12-23 17:35:00 +0000
+++ b/mysql-test/t/mysqldump.test	2011-12-24 09:38:59 +0000
@@ -2243,9 +2243,15 @@ INSERT INTO b12809202_db.t2 VALUES (1), 
 --echo
 --echo #### Dump ends here ####
 
+# Cleanup
 DROP TABLE b12809202_db.t1;
 DROP TABLE b12809202_db.t2;
 DROP DATABASE b12809202_db;
 
+--echo #
+--echo # Delete all existing binary logs.
+--echo #
+RESET MASTER;
+
 # Wait till we reached the initial number of concurrent sessions
 --source include/wait_until_count_sessions.inc

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (nirbhay.choubey:3665 to 3666) Bug#12809202Nirbhay Choubey25 Dec