summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 8d36889df76..56401ced67c 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -323,7 +323,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
}
if (tmp_arena)
thd->restore_backup_item_arena(tmp_arena, &backup);
- if (arena->is_stmt_prepare())
+ if (arena->is_stmt_prepare_or_first_sp_execute())
{
/* prepare fake select to initialize it correctly */
init_prepare_fake_select_lex(thd);