List:Commits« Previous MessageNext Message »
From:Sven Sandberg Date:November 29 2010 3:35pm
Subject:Re: bzr commit into mysql-trunk-bugfixing branch (zhenxing.he:3258)
Bug#56650
View as plain text  
Hi Zhenxing,

Nice work, patch approved!

/Sven


On 11/29/2010 06:55 AM, He Zhenxing wrote:
> #At file:///media/sdb2/hezx/work/mysql/bzr/b56650/trunk-bugfixing/ based on
> revid:wlad@stripped
>
>   3258 He Zhenxing	2010-11-29
>        BUG#56650 Valgrind warnings for memory leak in semisync plugin (MYSQL object
> not freed)
>
>        The problem was that the query result was not freed properly when
>        querying master semi-sync status on slave, fixed the problem by adding
>        code to free the query result.
>
>      modified:
>        plugin/semisync/semisync_slave_plugin.cc
> === modified file 'plugin/semisync/semisync_slave_plugin.cc'
> --- a/plugin/semisync/semisync_slave_plugin.cc	2010-05-31 15:29:54 +0000
> +++ b/plugin/semisync/semisync_slave_plugin.cc	2010-11-29 05:55:35 +0000
> @@ -53,7 +53,6 @@ int repl_semi_slave_request_dump(Binlog_
>     if (mysql_real_query(mysql, query, strlen(query)) ||
>         !(res= mysql_store_result(mysql)))
>     {
> -    mysql_free_result(mysql_store_result(mysql));
>       sql_print_error("Execution failed on master: %s", query);
>       return 1;
>     }
> @@ -65,8 +64,10 @@ int repl_semi_slave_request_dump(Binlog_
>       sql_print_warning("Master server does not support semi-sync, "
>                         "fallback to asynchronous replication");
>       rpl_semi_sync_slave_status= 0;
> +    mysql_free_result(res);
>       return 0;
>     }
> +  mysql_free_result(res);
>
>     /*
>       Tell master dump thread that we want to do semi-sync
> @@ -76,7 +77,6 @@ int repl_semi_slave_request_dump(Binlog_
>     if (mysql_real_query(mysql, query, strlen(query)))
>     {
>       sql_print_error("Set 'rpl_semi_sync_slave=1' on master failed");
> -    mysql_free_result(mysql_store_result(mysql));
>       return 1;
>     }
>     mysql_free_result(mysql_store_result(mysql));
>
>
>
>
>

Thread
bzr commit into mysql-trunk-bugfixing branch (zhenxing.he:3258) Bug#56650He Zhenxing29 Nov
  • Re: bzr commit into mysql-trunk-bugfixing branch (zhenxing.he:3258)Bug#56650Sven Sandberg29 Nov
  • Re: bzr commit into mysql-trunk-bugfixing branch (zhenxing.he:3258)Bug#56650Libing Song2 Dec