summaryrefslogtreecommitdiffstats
path: root/sql/sql_tvc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_tvc.cc')
-rw-r--r--sql/sql_tvc.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_tvc.cc b/sql/sql_tvc.cc
index c5a2b16a..fc1db382 100644
--- a/sql/sql_tvc.cc
+++ b/sql/sql_tvc.cc
@@ -271,7 +271,10 @@ bool table_value_constr::prepare(THD *thd, SELECT_LEX *sl,
if (!holders)
{
- holders= type_holders= new (thd->stmt_arena->mem_root) Type_holder[cnt];
+ DBUG_ASSERT(thd->stmt_arena->is_stmt_prepare_or_first_stmt_execute() ||
+ thd->stmt_arena->is_conventional());
+ holders= type_holders=
+ new (thd->active_stmt_arena_to_use()->mem_root) Type_holder[cnt];
if (!holders ||
join_type_handlers_for_tvc(thd, li, holders, cnt) ||
get_type_attributes_for_tvc(thd, li, holders,