-
Dmitry Shulga authored
Introduced the new data member new_query_arena_is_set of the class sp_head. This data member is used as a protection against double invocation of the method restore_thd_mem_root that is called for restoration of the current query arena. Previously, the data member sp_head::m_thd is used for this goal but after support for re-compilation of a failed stored routine statement has been added the data member sp_head::m_thd can't be used for this goal. The reason is that on a statement re-compilation after the method restore_thd_mem_root() is called the method sp_head::add_instr() invoked to add a new instruction for just re-compiled statement. The method sp_head::add_instr() de-references m_thd to access the free_list data member. If m_thd was used as a guard against double invocation it would result in a crash on dereferencing null pointer.
9e599235