summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-05 12:56:05 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-05 12:56:05 +0200
commit446b3ebdfc75f3a97d349d1347c4900a2e3eee03 (patch)
tree1fc75e520ac84591d2e2c647855f153a07ec3190 /sql/sql_union.cc
parent8f4de38f65ba89c6273c15c9adb50ab762d03f59 (diff)
parent90f09ba8c249e23e015ce9d1d56463869f1a5358 (diff)
downloadmariadb-git-446b3ebdfc75f3a97d349d1347c4900a2e3eee03.tar.gz
Merge 10.2 into 10.3
FIXME: Properly resolve conflicts between MDEV-18883 and MDEV-7742/MDEV-8305, and record the correct result for main.log_slow
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index edf85c2084b..7b0e79620ff 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -611,8 +611,9 @@ st_select_lex_unit::init_prepare_fake_select_lex(THD *thd_arg,
called at the first execution of the statement, while first_execution
shows whether this is called at the first execution of the union that
may form just a subselect.
- */
- if (!fake_select_lex->first_execution && first_execution)
+ */
+ if ((fake_select_lex->changed_elements & TOUCHED_SEL_COND) &&
+ first_execution)
{
for (ORDER *order= global_parameters()->order_list.first;
order;