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:
@ -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;
|
||||
|
Reference in New Issue
Block a user