List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:July 8 2010 12:46pm
Subject:bzr commit into mysql-5.1-bugteam branch (alfranio.correia:3470)
Bug#54238
View as plain text  
#At file:///home/acorreia/workspace.sun/repository.mysql.new/bug-54238/mysql-5.1-bugteam/ based on revid:li-bing.song@stripped

 3470 Alfranio Correia	2010-07-08
      BUG#54238 bad assignment in handle_slave_sql for skip_slave_counter
      
      Code cleanup: removed unused variable and bad assignment.

    modified:
      sql/slave.cc
      sql/sql_repl.cc
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc	2010-07-02 18:30:47 +0000
+++ b/sql/slave.cc	2010-07-08 12:46:48 +0000
@@ -3035,11 +3035,8 @@ log '%s' at position %s, relay log '%s' 
   pthread_mutex_lock(&rli->data_lock);
   if (rli->slave_skip_counter)
   {
-    char *pos;
-    pos= strmake(saved_log_name, rli->group_relay_log_name, FN_REFLEN - 1);
-    pos= '\0';
-    pos= strmake(saved_master_log_name, rli->group_master_log_name, FN_REFLEN - 1);
-    pos= '\0';
+    strmake(saved_log_name, rli->group_relay_log_name, FN_REFLEN - 1);
+    strmake(saved_master_log_name, rli->group_master_log_name, FN_REFLEN - 1);
     saved_log_pos= rli->group_relay_log_pos;
     saved_master_log_pos= rli->group_master_log_pos;
     saved_skip= rli->slave_skip_counter;

=== modified file 'sql/sql_repl.cc'
--- a/sql/sql_repl.cc	2010-07-02 18:30:47 +0000
+++ b/sql/sql_repl.cc	2010-07-08 12:46:48 +0000
@@ -1168,12 +1168,9 @@ bool change_master(THD* thd, Master_info
   /*
     Before processing the command, save the previous state.
   */
-  char *pos;
-  pos= strmake(saved_host, mi->host, HOSTNAME_LENGTH);
-  pos= '\0';
+  strmake(saved_host, mi->host, HOSTNAME_LENGTH);
   saved_port= mi->port;
-  pos= strmake(saved_log_name, mi->master_log_name, FN_REFLEN - 1);
-  pos= '\0';
+  strmake(saved_log_name, mi->master_log_name, FN_REFLEN - 1);
   saved_log_pos= mi->master_log_pos;
 
   /*


Attachment: [text/bzr-bundle]
Thread
bzr commit into mysql-5.1-bugteam branch (alfranio.correia:3470)Bug#54238Alfranio Correia8 Jul
  • Re: bzr commit into mysql-5.1-bugteam branch (alfranio.correia:3470)Bug#54238Libing Song23 Jul