1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fix for a memory leak.

This commit is contained in:
Nirbhay Choubey
2015-08-14 01:37:21 -04:00
parent e996304189
commit 52f1543ef1

View File

@@ -1199,6 +1199,7 @@ static int wsrep_TOI_begin(THD *thd, char *db_, char *table_,
uchar* buf(0);
size_t buf_len(0);
int buf_err;
int rc= 0;
WSREP_DEBUG("TO BEGIN: %lld, %d : %s", (long long)wsrep_thd_trx_seqno(thd),
thd->wsrep_exec_mode, thd->query() );
@@ -1238,7 +1239,6 @@ static int wsrep_TOI_begin(THD *thd, char *db_, char *table_,
{
thd->wsrep_exec_mode= TOTAL_ORDER;
wsrep_to_isolation++;
if (buf) my_free(buf);
wsrep_keys_free(&key_arr);
WSREP_DEBUG("TO BEGIN: %lld, %d",(long long)wsrep_thd_trx_seqno(thd),
thd->wsrep_exec_mode);
@@ -1250,18 +1250,18 @@ static int wsrep_TOI_begin(THD *thd, char *db_, char *table_,
ret, (thd->query()) ? thd->query() : "void");
my_error(ER_LOCK_DEADLOCK, MYF(0), "WSREP replication failed. Check "
"your wsrep connection state and retry the query.");
if (buf) my_free(buf);
wsrep_keys_free(&key_arr);
return -1;
rc= -1;
}
else {
/* non replicated DDL, affecting temporary tables only */
WSREP_DEBUG("TO isolation skipped for: %d, sql: %s."
"Only temporary tables affected.",
ret, (thd->query()) ? thd->query() : "void");
return 1;
rc= 1;
}
return 0;
if (buf) my_free(buf);
return rc;
}
static void wsrep_TOI_end(THD *thd) {