Skip to content

Commit 67b570a

Browse files
author
Nirbhay Choubey
committed
MDEV-10545: Server crashed in my_copy_fix_mb on querying I_S and P_S tables
After applying/replaying the transaction, the memory that stored the query string was also wrongly freed.
1 parent 9c88a54 commit 67b570a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sql/wsrep_applier.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,10 @@ wsrep_cb_status_t wsrep_commit_cb(void* const ctx,
365365
else
366366
rcode = wsrep_rollback(thd);
367367

368+
/* Cleanup */
368369
wsrep_set_apply_format(thd, NULL);
369370
thd->mdl_context.release_transactional_locks();
371+
thd->reset_query(); /* Mutex protected */
370372
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
371373
thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation;
372374

0 commit comments

Comments
 (0)