One of the customer reported that running a huge query (25KB) having a NOT-IN clause with many values running forever, causing the server to use available free memory and invoking the oom-killer to kill the mysqld process. Same behavior when tried to get the `EXPLAIN PLAN`.
Initially, checking the existing bugs, found following two:
As per those two bugs, we have told customer to turn off the "extended_keys" and check, but it's not helping out.
Further, locally on the MariaDB Server versions 10.2.21, 10.3.14 and 10.4.12(ES), I can reproduce the same behavior on an empty table. Here as well, neither setting "extended_keys=off" helped nor the "max_session_mem_used" system variable worked to avoid the exhaustion of available free memory.
Repro steps, I will share it separately.
Maybe, we need to understand how can we handle this case?