Details
-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
Description
When Index Condition Pushdown is employed, a single index lookup call like handler->index_read(lookup_tuple,...) can potentially enumerate lots (e.g. hundred of thousands) of index records before it finds one that satisfies the pushed index condition.
The problems are:
P1: MyISAM/Maria hold locks while enumerating those records, which means that one long query may stall others.
P2: For all storage engines: the state of thd->killed is not checked. This means that if one decides to kill the query (with KILL <thread_id> statement), it may take a very long time before the query is actually killed.
There is no testcase: Monty has found this out from the code (and provided a patch to address a problem with mi_rkey())
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Re: Index Condition Pushdown can make a thread hold MyISAM locks as well as be unKILLable for long time
Testcase note: making a mysql-test-run compatible testcase is difficult because "artificially long-running" predicates like SLEEP() actually check thd->killed. One has to use "naturally long-running" predicates, which still take fractions of second, so one also needs tables with lots of rows to observe that the query is not affected by KILL statement.