diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-06-21 23:47:39 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-06-21 23:47:39 +0200 |
commit | b942aa34c10ddfa3fe4977ae60afed5cbdc51083 (patch) | |
tree | 0a1a934ca7b728e3ffb81cd2f7c6a858524726d4 /sql/opt_subselect.cc | |
parent | fe3f9fa9183ea3d10397b6f7f4d422ae9bba00a4 (diff) | |
parent | c09a8b5b36edb494e2bcc93074c06e26cd9f2b92 (diff) | |
download | mariadb-git-b942aa34c10ddfa3fe4977ae60afed5cbdc51083.tar.gz |
Merge branch '10.1' into 10.2
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 90416e691d4..36d0116696a 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -5947,6 +5947,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; } @@ -5978,6 +5979,6 @@ bool JOIN::choose_tableless_subquery_plan() tmp_having= having; } } - exec_const_cond= conds; + exec_const_cond= zero_result_cause ? 0 : conds; return FALSE; } |