List:Commits« Previous MessageNext Message »
From:Luís Soares Date:September 21 2010 11:31am
Subject:Re: bzr commit into mysql-next-mr-bugfixing branch (luis.soares:3295)
Bug#56882
View as plain text  
Hi Zhenxing,

  Yes, will remove the err=0 in line 268.

Regards,
Luís

On 09/21/2010 09:53 AM, He Zhenxing wrote:
> Nice work, patch approved!
> 
> One minor suggestion, I think you can remove the err=0 in line 268 then.
> 
> Luis Soares wrote:
>> #At
> file:///home/lsoares/Workspace/bzr/work/bugfixing/56882/mysql-next-mr-bugfixing/ based on
> revid:alfranio.correia@stripped
>>
>>  3295 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
>> === 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-20 23:00:48 +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)))
> 
> 
> 

Thread
bzr commit into mysql-next-mr-bugfixing branch (luis.soares:3295) Bug#56882Luis Soares21 Sep
  • Re: bzr commit into mysql-next-mr-bugfixing branch (luis.soares:3295)Bug#56882He Zhenxing21 Sep
    • Re: bzr commit into mysql-next-mr-bugfixing branch (luis.soares:3295)Bug#56882Luís Soares21 Sep