1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Ensure that thd->user_var_events_alloc is always relevant

If binary logging is not enabled thd->user_var_events_alloc
would never be initialized.
This commit is contained in:
Monty
2018-02-01 20:03:18 +02:00
parent 44314c768f
commit 859fe1f24d
3 changed files with 12 additions and 4 deletions

View File

@ -7483,10 +7483,9 @@ void THD::reset_for_next_command(bool do_clear_error)
thd->thread_specific_used= FALSE;
if (opt_bin_log)
{
reset_dynamic(&thd->user_var_events);
thd->user_var_events_alloc= thd->mem_root;
}
DBUG_ASSERT(thd->user_var_events_alloc == &thd->main_mem_root);
thd->get_stmt_da()->reset_for_next_command();
thd->rand_used= 0;
thd->m_sent_row_count= thd->m_examined_row_count= 0;