diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-06-19 14:04:53 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-06-19 14:04:53 +0400 |
commit | f5b128dfad1f46bf73916bc9c803a7152fdd6809 (patch) | |
tree | 447ef763592b99402ced91dd6e6203f2b3c5368f /sql/opt_subselect.cc | |
parent | f7b1b2bc5d6e1f923aca0ee8c5232cf095075c7b (diff) | |
parent | c450f7d8d5bfdc0d3ae0fbc634eb22d4b75e7322 (diff) | |
download | mariadb-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.cc | 3 |
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; } |