List:Commits« Previous MessageNext Message »
From:Libing Song Date:December 2 2010 6:54am
Subject:Re: bzr commit into mysql-trunk-bugfixing branch (zhenxing.he:3258)
Bug#56650
View as plain text  
Hi Zhenxing,
Nice work, patch approved!

On Mon, 2010-11-29 at 05:55 +0000, 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));
> 
> text/bzr-bundle type attachment
> (bzr/zhenxing.he@stripped)
> # Bazaar merge directive format 2 (Bazaar 0.90)
> # revision_id: zhenxing.he@stripped
> # target_branch: file:///media/sdb2/hezx/work/mysql/bzr/b56650/trunk-\
> #   bugfixing/
> # testament_sha1: b43fe7c7d3def333fc1befeadd35b2a8785f73b9
> # timestamp: 2010-11-29 13:55:45 +0800
> # base_revision_id: wlad@stripped
> # 
> # Begin bundle
> IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWdJ4RP0AAaLfgEAQWGf//1LG
> LzC////wUAP4ec0XKdIDrwlEiniGmmFNiaZNTGhqNGgyaGEHqDJT0mlPwTRpCNGTQaAHqAAAAyJo
> mTVPyTJNkap5Q0xNMCMRjUYTQcwCaYBMhgACYJgAAAkkJqbKaaGFMNU/Kn6U9TaI0GgD1ABQusv2
> ZBPHxGGOlSI5UOSHX2qAsLntVyza4uDoX9lERCG7wPNoS4NAaiKgc9znIKp3e+9c/Te/Ko8Ga30x
> 1Sj1K9saCaC0MH4iDhZZKIVbpcnDJMJpzBUB6dAtE9tRWp1mmYcCMwcaz34abTLCSxAMcib3CNeZ
> iBtliHs5lkr7+rxDQyGQMurixVWUCbcwnK5RB8hnfwTCKwrc5N34xRJheDFB+CyHDAWpT0tIDspl
> 1wBg0UGetUp7n5dCUJqRjrZlRHWi7BtDUcDGDCCg/CwGgD88JZjgyLCYztUCYcaqgbK9MygrkIFz
> QWqllobYWk5TbjM6i8W7r4iYqBsWTtYMoRW4mm58qVPsBfLLtZRWC0Gqs34pkFtIsVylCphoyxsa
> qRGD9KspQsaKbrQoTWDpBuleiRAWQqEpGdgvtdJtz1AhMZg2yOzG+a5GJEXGIKFEKDEuDNAP7W2i
> OfLOjNgkKKGUo9GEQIWJcxh1jrF/10P0heRdvbz2MYACSopo4Ncmvnh9dHs8XJayB+NUDV6NmxGB
> Gyiucu2vphtMLppINQN9d0cfZefQ8tyVmNR16EMc2pmst4pn3T5kTAVLkM1OfDu/z0fnQ7FUziSK
> zAsTnfuXsGoG2wwPUrjwGLBnagVPBusyPOdaawkc9m6YblONKZRuRxd98ckKtlkKJliWxkUIRo0O
> N4qronN621aGBMTz32YnisVtTopiNIl9lRamVyeB53Yb3U5lC0GcxwPYIp/kLplZgSPuzWSysSxb
> hRjQg+gsKErMx2hGfylSJe8bsiJakQRE9N8wpNQQ7ZUVygoRhgnFe5hA7Z0UB/hVM7QEgXC2D8PD
> duy1don7w6LiEwm4HmKgHJcdRUbeSJ8wwqLlYkTgpOvqNAr9Do0Fi+9NxGSpeM6tIe/2sRqwFVSi
> jQ5CzjKkmihhMmA4ZwiYrctj/Fel4KMw5xU5gy3O7GMizXDuFp3syeUHlINK16jzXeriBlLhqN7G
> YoBnaiKOZLYNXpcTh2umqTaXxcUUQYcMNGNjPLhR2vmePVistaviDSO5qXpy5EyGqkJKAf5IfODB
> RtMndFizrX+YtG5J2zWUsFL960MsAeArKiplZdhjynXqtA1PJMUuheeEzKgIUrC5VCZWBYvYK66Q
> DdFJWbAsZbRazXSYmI1cXnoXckU4UJDSeET9
> 
> 

-- 
Your Sincerely,
Libing Song
==================================
MySQL Replication Team
Software Engineer


Email : Li-Bing.Song@stripped
Skype : libing.song
MSN   : slb_database@stripped
Phone : +86 010-6505-4020 ext. 319
Mobile: +86 138-1144-2038
==================================

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