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

MDEV-32466: Potential memory leak on executing of create view statement

This is the follow-up patch that removes explicit use of thd->stmt_arena
for memory allocation and replaces it with call of the method
  THD::active_stmt_arena_to_use()
Additionally, this patch adds extra DBUG_ASSERT to check that right
query arena is in use.
This commit is contained in:
Dmitry Shulga
2023-11-24 16:28:31 +07:00
parent 5064750fbf
commit 85f2e4f8e8
10 changed files with 49 additions and 15 deletions

View File

@ -2298,7 +2298,8 @@ add_tables_and_routines_for_triggers(THD *thd,
MDL_key key(MDL_key::TRIGGER, trigger->m_db.str, trigger->m_name.str);
if (sp_add_used_routine(prelocking_ctx, thd->stmt_arena,
if (sp_add_used_routine(prelocking_ctx,
thd->active_stmt_arena_to_use(),
&key, &sp_handler_trigger,
table_list->belong_to_view))
{