From: Luis Soares Date: September 20 2010 11:00pm Subject: bzr commit into mysql-next-mr-bugfixing branch (luis.soares:3295) Bug#56882 List-Archive: http://lists.mysql.com/commits/118653 X-Bug: 56882 Message-Id: <201009202302.o8K7wQmc031735@rcsinet15.oracle.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6132842944261142951==" --===============6132842944261142951== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #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))) --===============6132842944261142951== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/luis.soares@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: luis.soares@stripped # target_branch: file:///home/lsoares/Workspace/bzr/work/bugfixing\ # /56882/mysql-next-mr-bugfixing/ # testament_sha1: 01a3e62472efbb9033c984459247f4d626ebbace # timestamp: 2010-09-21 00:00:55 +0100 # base_revision_id: alfranio.correia@stripped\ # sxo39h0p2dc47omn # # Begin bundle Iy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