Commit df07595d authored by Luis Soares's avatar Luis Soares

BUG#12425924: SEMI-SYNC RELATED VALGRIND WARNINGS IN 5.5 CODEBASE

There are a couple of valgrind warnings in 5.5 codebase, that
do not exist in 5.6. The root cause was found and fixed in 5.6
codebase before (BUG#11763880 and BUG#11763879), but the patches
were only pushed to 5.6.

To fix it in 5.5, we cherrypicked the csets from 5.6 and merged 
them in 5.5.
parents fabd4f9a 7d719a9c
...@@ -53,7 +53,6 @@ int repl_semi_slave_request_dump(Binlog_relay_IO_param *param, ...@@ -53,7 +53,6 @@ int repl_semi_slave_request_dump(Binlog_relay_IO_param *param,
if (mysql_real_query(mysql, query, strlen(query)) || if (mysql_real_query(mysql, query, strlen(query)) ||
!(res= mysql_store_result(mysql))) !(res= mysql_store_result(mysql)))
{ {
mysql_free_result(mysql_store_result(mysql));
sql_print_error("Execution failed on master: %s", query); sql_print_error("Execution failed on master: %s", query);
return 1; return 1;
} }
...@@ -65,8 +64,10 @@ int repl_semi_slave_request_dump(Binlog_relay_IO_param *param, ...@@ -65,8 +64,10 @@ int repl_semi_slave_request_dump(Binlog_relay_IO_param *param,
sql_print_warning("Master server does not support semi-sync, " sql_print_warning("Master server does not support semi-sync, "
"fallback to asynchronous replication"); "fallback to asynchronous replication");
rpl_semi_sync_slave_status= 0; rpl_semi_sync_slave_status= 0;
mysql_free_result(res);
return 0; return 0;
} }
mysql_free_result(res);
/* /*
Tell master dump thread that we want to do semi-sync Tell master dump thread that we want to do semi-sync
...@@ -76,7 +77,6 @@ int repl_semi_slave_request_dump(Binlog_relay_IO_param *param, ...@@ -76,7 +77,6 @@ int repl_semi_slave_request_dump(Binlog_relay_IO_param *param,
if (mysql_real_query(mysql, query, strlen(query))) if (mysql_real_query(mysql, query, strlen(query)))
{ {
sql_print_error("Set 'rpl_semi_sync_slave=1' on master failed"); sql_print_error("Set 'rpl_semi_sync_slave=1' on master failed");
mysql_free_result(mysql_store_result(mysql));
return 1; return 1;
} }
mysql_free_result(mysql_store_result(mysql)); mysql_free_result(mysql_store_result(mysql));
......
...@@ -73,7 +73,10 @@ public: ...@@ -73,7 +73,10 @@ public:
while (info && info->observer != observer) while (info && info->observer != observer)
info= iter++; info= iter++;
if (info) if (info)
{
iter.remove(); iter.remove();
delete info;
}
else else
ret= TRUE; ret= TRUE;
unlock(); unlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment