List:Commits« Previous MessageNext Message »
From:Luis Soares Date:December 3 2010 1:43pm
Subject:bzr commit into mysql-5.1-bugteam branch (luis.soares:3512) Bug#58324
View as plain text  
#At file:///home/lsoares/Workspace/bzr/work/bugfixing/58324/mysql-5.1-bugteam/ based on revid:mats.kindahl@stripped

 3512 Luis Soares	2010-12-03
      BUG#58324
      
      WORK-IN-PROGRESS
      
      Extended test case for 5.1 .

    added:
      mysql-test/suite/rpl/t/rpl_bug58324.test
    modified:
      sql/slave.cc
=== added file 'mysql-test/suite/rpl/t/rpl_bug58324.test'
--- a/mysql-test/suite/rpl/t/rpl_bug58324.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_bug58324.test	2010-12-03 13:43:20 +0000
@@ -0,0 +1,30 @@
+source include/master-slave.inc;
+source include/have_binlog_format_row.inc;
+
+connection slave;
+source include/stop_slave.inc;
+CHANGE MASTER TO master_user='fake';
+START SLAVE;
+
+# can't use include/wait_for_slave_io_to_stop.inc in 5.1
+# because while reconnecting, IO thread has wrong state
+# making wait_for_slave_io... to bail out too soon
+-- sleep 12
+
+#source include/wait_for_slave_io_to_stop.inc;
+
+#
+# Now go and inspect the slave's error log.
+# You'll find several entries, one for each
+# reconnection attempt.
+#
+# This is already the case for mysql-trunk atm,
+# because of fix for BUG#56416. 
+
+# All in all, reconnection
+# behavior is the same for 5.1, 5.5 and trunk. Trunk
+# differes only in the fact that it adds to the error
+# log one entry for each failed attempt
+#
+
+-- exit

=== modified file 'sql/slave.cc'
--- a/sql/slave.cc	2010-11-10 21:14:47 +0000
+++ b/sql/slave.cc	2010-12-03 13:43:20 +0000
@@ -3901,8 +3901,8 @@ static int connect_to_master(THD* thd, M
                              mi->port, 0, client_flag) == 0))
   {
     /* Don't repeat last error */
-    if ((int)mysql_errno(mysql) != last_errno)
-    {
+/*    if ((int)mysql_errno(mysql) != last_errno)
+    {*/
       last_errno=mysql_errno(mysql);
       suppress_warnings= 0;
       mi->report(ERROR_LEVEL, last_errno,
@@ -3911,7 +3911,7 @@ static int connect_to_master(THD* thd, M
                  (reconnect ? "reconnecting" : "connecting"),
                  mi->user, mi->host, mi->port,
                  mi->connect_retry, master_retry_count);
-    }
+    //}
     /*
       By default we try forever. The reason is that failure will trigger
       master election, so if the user did not set master_retry_count we


Attachment: [text/bzr-bundle] bzr/luis.soares@oracle.com-20101203134320-ds9h85px23k0380y.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (luis.soares:3512) Bug#58324Luis Soares3 Dec