summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-06-30 16:39:20 +0200
committerSergei Golubchik <serg@mariadb.org>2018-06-30 16:39:20 +0200
commit36e59752e7fc70bc5179a3d730b5ce3ee58e4e30 (patch)
tree0d3e30ce973b2e1f044931c0eb1846d7192becda /sql/opt_subselect.cc
parent7c0779da7c37f6ef6eff2f79dda6f1b0c57e3869 (diff)
parent1dd3c8f8ba49ec06e550d7376d27ff05ce024bec (diff)
downloadmariadb-git-36e59752e7fc70bc5179a3d730b5ce3ee58e4e30.tar.gz
Merge branch '10.2' into 10.3
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 1cfdcc9c9b2..7669610c696 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -5935,6 +5935,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;
}
@@ -5966,6 +5967,6 @@ bool JOIN::choose_tableless_subquery_plan()
tmp_having= having;
}
}
- exec_const_cond= conds;
+ exec_const_cond= zero_result_cause ? 0 : conds;
return FALSE;
}