Skip to content

Commit 8c89e84

Browse files
Daniele SciasciaNirbhay Choubey
authored andcommitted
- Moves cleanup of status vars to function export_wsrep_status_to_mysql().
1 parent 2c56142 commit 8c89e84

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

sql/sql_class.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,10 +2361,6 @@ void THD::cleanup_after_query()
23612361
rgi_slave->cleanup_after_query();
23622362
#endif
23632363

2364-
#ifdef WITH_WSREP
2365-
wsrep_free_status(this);
2366-
#endif /* WITH_WSREP */
2367-
23682364
DBUG_VOID_RETURN;
23692365
}
23702366

sql/wsrep_var.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,11 @@ static void export_wsrep_status_to_mysql(THD* thd)
567567
{
568568
int wsrep_status_len, i;
569569

570+
if (thd->wsrep_status_vars)
571+
{
572+
wsrep->stats_free(wsrep, thd->wsrep_status_vars);
573+
}
574+
570575
thd->wsrep_status_vars = wsrep->stats_get(wsrep);
571576

572577
if (!thd->wsrep_status_vars) {

0 commit comments

Comments
 (0)