From cf4362013649d67d59201d8a1b00fe5111c42913 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 16 Oct 2015 11:51:11 +0200 Subject: [PATCH] refs codership/galera#308 - Avoid calling wsrep->stats_free() directly, instead, use wsrep_free_status(). --- sql/sql_class.cc | 2 +- sql/wsrep_var.cc | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 6c7282c3505..7705ac45ffa 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1837,7 +1837,7 @@ THD::~THD() mysql_mutex_unlock(&LOCK_wsrep_thd); mysql_mutex_destroy(&LOCK_wsrep_thd); if (wsrep_rgi) delete wsrep_rgi; - if (wsrep_status_vars) wsrep->stats_free(wsrep, wsrep_status_vars); + wsrep_free_status(this); #endif /* Close connection */ #ifndef EMBEDDED_LIBRARY diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index 7e64b654c92..7ac68df66bd 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -567,10 +567,7 @@ static void export_wsrep_status_to_mysql(THD* thd) { int wsrep_status_len, i; - if (thd->wsrep_status_vars) - { - wsrep->stats_free(wsrep, thd->wsrep_status_vars); - } + wsrep_free_status(thd); thd->wsrep_status_vars = wsrep->stats_get(wsrep);