diff options
author | Daniele Sciascia <daniele.sciascia@galeracluster.com> | 2015-10-02 10:16:55 +0200 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-02-22 16:10:01 -0500 |
commit | 0ec457b0de083e45b815a04f4f6de0bcc002ffc6 (patch) | |
tree | 1e9bd0a6ed8e9d7f313e0f06baa05e6bc2a0f071 | |
parent | 00b058aca3ab48e15c056d689ced936b8c71ea64 (diff) | |
download | mariadb-git-0ec457b0de083e45b815a04f4f6de0bcc002ffc6.tar.gz |
refs codership/galera#308
- Moves call wsrep_free_status() to THD::cleanup_after_query().
Wsrep status variables were previously freed only on SHOW STATUS.
- Removes valgrind suppression from mysql-test/valgrind.
-rw-r--r-- | mysql-test/valgrind.supp | 22 | ||||
-rw-r--r-- | sql/sql_class.cc | 4 | ||||
-rw-r--r-- | sql/sql_parse.cc | 3 |
3 files changed, 4 insertions, 25 deletions
diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index 09f5514f3b3..b0c6533df0b 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -1284,28 +1284,6 @@ } { - GitHub codership/galera#308 - Memcheck:Leak - match-leak-kinds: definite - fun:malloc - fun:_ZNK6galera13ReplicatorSMM9stats_getEv - fun:_ZL28export_wsrep_status_to_mysqlP3THD - fun:_Z17wsrep_show_statusP3THDP17st_mysql_show_varPc - fun:_ZL17show_status_arrayP3THDPKcP17st_mysql_show_var13enum_var_typeP17system_status_varS2_P5TABLEbP4Item - fun:_Z11fill_statusP3THDP10TABLE_LISTP4Item - fun:_ZL13do_fill_tableP3THDP10TABLE_LISTP13st_join_table - fun:_Z24get_schema_tables_resultP4JOIN23enum_schema_table_state - fun:_ZN4JOIN14prepare_resultEPP4ListI4ItemE - fun:_ZN4JOIN4execEv - fun:_ZL20mysql_execute_selectP3THDP13st_select_lexb - fun:_Z12mysql_selectP3THDP10TABLE_LISTjR4ListI4ItemEPS4_P10SQL_I_ListI8st_orderESB_S7_yP13select_resultP18st_select_lex_unitP13st_select_lex - fun:_Z13handle_selectP3THDP13select_resultm - fun:_ZL21execute_sqlcom_selectP3THDP10TABLE_LIST - fun:_Z21mysql_execute_commandP3THD - fun:_Z11mysql_parseP3THDPcjP12Parser_state -} - -{ GitHub codership/mysql-wsrep#176 Memcheck:Leak fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 6c7282c3505..5534cdde596 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -2361,6 +2361,10 @@ void THD::cleanup_after_query() rgi_slave->cleanup_after_query(); #endif +#ifdef WITH_WSREP + wsrep_free_status(this); +#endif /* WITH_WSREP */ + DBUG_VOID_RETURN; } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 802721901a8..99a1af749f9 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2774,9 +2774,6 @@ mysql_execute_command(THD *thd) case SQLCOM_SHOW_STATUS: { execute_show_status(thd, all_tables); -#ifdef WITH_WSREP - wsrep_free_status(thd); -#endif /* WITH_WSREP */ break; } case SQLCOM_SHOW_EXPLAIN: |