List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:October 8 2008 7:41pm
Subject:bzr commit into mysql-6.0 branch (mats:2862) Bug#39934
View as plain text  
#At file:///home/bzr/merges/merge-6.0-5.1.29-rc/

 2862 Mats Kindahl	2008-10-08
      Bug #39934:
      Slave stops for engine that only support row-based logging
      
      Since the SQL slave thread is running under STATEMENT mode,
      this prevents the slave from switching to row-based format
      when necessary.
      
      This patches solve the situation by always setting the SQL
      thread in MIXED mode, regardless of what the default is.
modified:
  sql/slave.cc

=== modified file 'sql/slave.cc'
--- a/sql/slave.cc	2008-09-26 14:05:38 +0000
+++ b/sql/slave.cc	2008-10-08 19:41:49 +0000
@@ -1466,6 +1466,13 @@ static int init_slave_thread(THD* thd, S
   }
   lex_start(thd);
 
+  /*
+    The SQL thread has to run under mixed mode no matter what to allow
+    replication to switch to row-based format if required by the
+    storage engine. It is not necessary to set the I/O thread to use
+    MIXED mode, but it does not harm.
+   */
+  thd->variables.binlog_format= BINLOG_FORMAT_MIXED;
   if (thd_type == SLAVE_THD_SQL)
     thd_proc_info(thd, "Waiting for the next event in relay log");
   else

Thread
bzr commit into mysql-6.0 branch (mats:2862) Bug#39934Mats Kindahl8 Oct