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.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 2a657e9d20d..5e9a50d038e 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -349,6 +349,11 @@ int st_select_lex_unit::exec()
mysql_select automatic allocation)
*/
fake_select_lex->join= new JOIN(thd, item_list, thd->options, result);
+ /*
+ Fake st_select_lex should have item list for correctref_array
+ allocation.
+ */
+ fake_select_lex->item_list= item_list;
}
else
{