summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2018-06-19 14:03:41 +0400
committerAlexander Barkov <bar@mariadb.com>2018-06-19 14:03:41 +0400
commitc450f7d8d5bfdc0d3ae0fbc634eb22d4b75e7322 (patch)
tree30e1e8d1c2d0fe276cd391d6122b3990ce87b579 /sql/opt_subselect.cc
parent3661d9882224dd485556ce937c1294eaeda02ef8 (diff)
parent15b92915ed93661a56f40430204d18bf7b7cf1fc (diff)
downloadmariadb-git-c450f7d8d5bfdc0d3ae0fbc634eb22d4b75e7322.tar.gz
Merge remote-tracking branch 'origin/5.5' into 10.0
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 d8ecdc9a2ee..a1683435708 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -5937,6 +5937,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;
}
@@ -5968,6 +5969,6 @@ bool JOIN::choose_tableless_subquery_plan()
tmp_having= having;
}
}
- exec_const_cond= conds;
+ exec_const_cond= zero_result_cause ? 0 : conds;
return FALSE;
}