List:Commits« Previous MessageNext Message »
From:Li-Bing.Song Date:November 5 2009 9:13am
Subject:bzr commit into mysql-6.0-codebase-bugfixing branch (Li-Bing.Song:3694)
Bug#47699
View as plain text  
#At file:///home/anders/work/bzrwork/worktree5/mysql-6.0-codebase-bugfixing/ based on revid:marc.alff@stripped

 3694 Li-Bing.Song@stripped	2009-11-05
      Bug#47699  	rpl.rpl_backup_block fails sporadically
      
      After 'START SLAVE' is executed, An unexpected error 'RESTORE_ON_MASTER' 
      appears in Last_Error. On Slave, The Last_Error is cleared after 
      'START SLAVE [SQL_THREAD]' has returned. 'SHOW SLAVE STATUS' sometimes is 
      executed earlier than that Last_Error is cleared. So the last error which 
      has happened before 'START SLAVE' still appears in the slave status.
      
      This patch wrote code to clear error before 'START SLAVE [SQL_THREAD]' returns.

    modified:
      sql/slave.cc
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc	2009-10-26 14:02:26 +0000
+++ b/sql/slave.cc	2009-11-05 09:13:30 +0000
@@ -3187,9 +3187,6 @@ pthread_handler_t handle_slave_sql(void 
     Seconds_Behind_Master grows. No big deal.
   */
   rli->abort_slave = 0;
-  pthread_mutex_unlock(&rli->run_lock);
-  pthread_cond_broadcast(&rli->start_cond);
-
   /*
     Reset errors for a clean start (otherwise, if the master is idle, the SQL
     thread may execute no Query_log_event, so the error will remain even
@@ -3202,6 +3199,9 @@ pthread_handler_t handle_slave_sql(void 
   */
   rli->clear_error();
 
+  pthread_mutex_unlock(&rli->run_lock);
+  pthread_cond_broadcast(&rli->start_cond);
+
   //tell the I/O thread to take relay_log_space_limit into account from now on
   pthread_mutex_lock(&rli->log_space_lock);
   rli->ignore_log_space_limit= 0;


Attachment: [text/bzr-bundle] bzr/li-bing.song@sun.com-20091105091330-v4lx45v02uz4gz7e.bundle
Thread
bzr commit into mysql-6.0-codebase-bugfixing branch (Li-Bing.Song:3694)Bug#47699Li-Bing.Song5 Nov
  • Re: bzr commit into mysql-6.0-codebase-bugfixing branch(Li-Bing.Song:3694) Bug#47699He Zhenxing11 Nov