List:Commits« Previous MessageNext Message »
From:Luis Soares Date:September 21 2010 11:33am
Subject:bzr push into mysql-next-mr-bugfixing branch (luis.soares:3297 to 3298)
Bug#56882
View as plain text  
 3298 Luis Soares	2010-09-21
      BUG#56882: binlog_base64_flag fails on valgrind and win debug 
                 max platforms
            
      In some cases, the variable err in mysql_client_binlog_statement
      would not be initialized but still some conditional jumps would
      rely on its value. This is for instance the case when a BINLOG
      event is truncated and it returns an error. In this case the
      'err' variable is not initialized at that time, but we jump to
      the label 'end' and then check the following condition: 
            
         if ((error || err) && ... )
            
      This makes valgrind complain that there is a conditional jump or
      move depending on an uninitialized value.
      
      We fix this by initializing the variable err to 0.

    modified:
      sql/sql_binlog.cc
 3297 Tor Didriksen	2010-09-21 [merge]
      Auto-merge: next-mr-opt-team => next-mr-bugfixing

    modified:
      mysql-test/include/subquery_sj.inc
      mysql-test/r/subquery_sj_all.result
      mysql-test/r/subquery_sj_all_jcl6.result
      mysql-test/r/subquery_sj_all_jcl7.result
      mysql-test/r/subquery_sj_dupsweed.result
      mysql-test/r/subquery_sj_dupsweed_jcl6.result
      mysql-test/r/subquery_sj_dupsweed_jcl7.result
      mysql-test/r/subquery_sj_firstmatch.result
      mysql-test/r/subquery_sj_firstmatch_jcl6.result
      mysql-test/r/subquery_sj_firstmatch_jcl7.result
      mysql-test/r/subquery_sj_loosescan.result
      mysql-test/r/subquery_sj_loosescan_jcl6.result
      mysql-test/r/subquery_sj_loosescan_jcl7.result
      mysql-test/r/subquery_sj_mat.result
      mysql-test/r/subquery_sj_mat_jcl6.result
      mysql-test/r/subquery_sj_mat_jcl7.result
      mysql-test/r/subquery_sj_mat_nosj.result
      mysql-test/r/subquery_sj_none.result
      mysql-test/r/subquery_sj_none_jcl6.result
      mysql-test/r/subquery_sj_none_jcl7.result
      sql/item_subselect.cc
      sql/sql_select.cc
=== modified file 'sql/sql_binlog.cc'
--- a/sql/sql_binlog.cc	2010-09-01 02:51:08 +0000
+++ b/sql/sql_binlog.cc	2010-09-21 11:32:50 +0000
@@ -147,7 +147,7 @@ void mysql_client_binlog_statement(THD* 
     Allocation
   */
 
-  int err;
+  int err= 0;
   Relay_log_info *rli;
   rli= thd->rli_fake;
   if (!rli && (rli= thd->rli_fake= new Relay_log_info(FALSE)))
@@ -264,8 +264,6 @@ void mysql_client_binlog_statement(THD* 
       */
 #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
       err= ev->apply_event(rli);
-#else
-      err= 0;
 #endif
       /*
         Format_description_log_event should not be deleted because it


Attachment: [text/bzr-bundle] bzr/luis.soares@oracle.com-20100921113250-7t6sun4ai2hgh47d.bundle
Thread
bzr push into mysql-next-mr-bugfixing branch (luis.soares:3297 to 3298)Bug#56882Luis Soares21 Sep