summaryrefslogtreecommitdiff
path: root/sql/opt_range.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-05-20 17:04:22 +0200
committerSergei Golubchik <serg@mariadb.org>2020-05-27 15:56:40 +0200
commitad772478660a67c1c93c22725e25b168ec512f4d (patch)
treef4102deab70e0c5f4ae4394c80d2cbc5d687e81c /sql/opt_range.h
parent1e951155bddd42b84e1c4ed949a85d62829e696f (diff)
downloadmariadb-git-ad772478660a67c1c93c22725e25b168ec512f4d.tar.gz
MDEV-21958 Query having many NOT-IN clauses running forever and causing available free memory to use completely
let thd->killed to abort range optimizer
Diffstat (limited to 'sql/opt_range.h')
-rw-r--r--sql/opt_range.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/opt_range.h b/sql/opt_range.h
index dff50252e1a..1e6aca540d8 100644
--- a/sql/opt_range.h
+++ b/sql/opt_range.h
@@ -656,6 +656,7 @@ public:
bool statement_should_be_aborted() const
{
return
+ thd->killed ||
thd->is_fatal_error ||
thd->is_error() ||
alloced_sel_args > SEL_ARG::MAX_SEL_ARGS;