Bug #19021 Server crashes while resolving index merge
Submitted: 11 Apr 2006 22:24 Modified: 14 Apr 2006 16:13
Reporter: Kolbe Kegel
Status: Closed
Category:Server: Optimizer Severity:S1 (Critical)
Version:5.0.20 OS:Linux (Linux)
Assigned to: Bugs System Target Version:

[11 Apr 2006 22:24] Kolbe Kegel
Description:
The MySQL server crashes with SIGSEGV while resolving certain execution plans that use the
index merge optimization.

How to repeat:
See attached file.

Suggested fix:
n/a
[13 Apr 2006 1:29] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/4891
[13 Apr 2006 10:07] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/4905
[13 Apr 2006 10:21] Sergey Petrunya
The fix has been pushed into 5.0.21 tree.

Note for the changelog: 
The bug was affected when evaluating possibility to use Index Merge/Intersection+"Using
index" variant of index_merge. In order to hit a bug, all usable indexes together should
cover all fields accessed by the query, and table statistics must have some particular
values (the precise criteria is very complicated).

The effect of the bug was either a crash or choice of non-optimal subset of indexes to be
used in Index Merge/intersection.
[14 Apr 2006 16:13] Paul DuBois
Noted in 5.0.21 changelog.

The optimizer could cause a server crash or use a non-optimal
subset of indexes when evaluating whether to use
<literal>Index Merge/Intersection</literal> variant of
<literal>index_merge</literal> optimization. (Bug #19021)