summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@oracle.com>2011-05-04 14:07:59 +0100
committerLuis Soares <luis.soares@oracle.com>2011-05-04 14:07:59 +0100
commit47ef8f3452bd82324e5459cc5964e31407789e05 (patch)
treeb7071ee80d4965cce79fabcb7681f26334b79b8c /plugin
parent0e647bc72d5e261e11245bf512e5ea37245ea90f (diff)
downloadmariadb-git-47ef8f3452bd82324e5459cc5964e31407789e05.tar.gz
Automerged (cherrypicked) cset from 5.6:
zhenxing.he@sun.com-20101202073812-iel8lvhmulyagtsv This takes care of valgrind warnings in 5.5 that exhibit the same trace as in BUG#11763880 (BUG#56650).
Diffstat (limited to 'plugin')
-rw-r--r--plugin/semisync/semisync_slave_plugin.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/semisync/semisync_slave_plugin.cc b/plugin/semisync/semisync_slave_plugin.cc
index 5aa32cdfd5f..cfb04bdd276 100644
--- a/plugin/semisync/semisync_slave_plugin.cc
+++ b/plugin/semisync/semisync_slave_plugin.cc
@@ -53,7 +53,6 @@ int repl_semi_slave_request_dump(Binlog_relay_IO_param *param,
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_relay_IO_param *param,
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_relay_IO_param *param,
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));