summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2018-06-19 14:04:53 +0400
committerAlexander Barkov <bar@mariadb.com>2018-06-19 14:04:53 +0400
commitf5b128dfad1f46bf73916bc9c803a7152fdd6809 (patch)
tree447ef763592b99402ced91dd6e6203f2b3c5368f /sql/opt_subselect.cc
parentf7b1b2bc5d6e1f923aca0ee8c5232cf095075c7b (diff)
parentc450f7d8d5bfdc0d3ae0fbc634eb22d4b75e7322 (diff)
downloadmariadb-git-f5b128dfad1f46bf73916bc9c803a7152fdd6809.tar.gz
Merge remote-tracking branch 'origin/10.0' into 10.1
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r--sql/opt_subselect.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 89338928cb5..732ed91fe00 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -5955,6 +5955,7 @@ bool JOIN::choose_tableless_subquery_plan()
functions produce empty subquery result. There is no need to further
rewrite the subquery because it will not be executed at all.
*/
+ exec_const_cond= 0;
return FALSE;
}
@@ -5986,6 +5987,6 @@ bool JOIN::choose_tableless_subquery_plan()
tmp_having= having;
}
}
- exec_const_cond= conds;
+ exec_const_cond= zero_result_cause ? 0 : conds;
return FALSE;
}