Skip to content

Commit ad77247

Browse files
committed
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
1 parent 1e95115 commit ad77247

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sql/opt_range.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,7 @@ class RANGE_OPT_PARAM
656656
bool statement_should_be_aborted() const
657657
{
658658
return
659+
thd->killed ||
659660
thd->is_fatal_error ||
660661
thd->is_error() ||
661662
alloced_sel_args > SEL_ARG::MAX_SEL_ARGS;

0 commit comments

Comments
 (0)