summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index dad05981af4..f8e9bde282a 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -273,9 +273,13 @@ bool Item_subselect::exec()
{
int res;
- if (thd->is_error())
- /* Do not execute subselect in case of a fatal error */
+ /*
+ Do not execute subselect in case of a fatal error
+ or if the query has been killed.
+ */
+ if (thd->is_error() || thd->killed)
return 1;
+
/*
Simulate a failure in sub-query execution. Used to test e.g.
out of memory or query being killed conditions.