• Davi Arnaut's avatar
    Bug#47761: crash when killing a query during subquery execution... · ea09256c
    Davi Arnaut authored
    The problem was that killing a query during the optimization
    phase of a subselect would lead to crashes. The root of the
    problem is that the subselect execution engine ignores failures
    (eg: killed) during the optimization phase (JOIN::optimize),
    leading to a crash once the subquery is executed due to
    partially initialized structures (in this case a join tab).
    
    The optimal solution would be to cleanup certain optimizer
    structures if the optimization phase fails, but currently
    there is no infrastructure to properly to track and cleanup
    the structures. To workaround the whole problem one somewhat
    good solution is to avoid executing a subselect if the query
    has been killed. Cutting short any problems caused by failures
    during the optimization phase.
    ea09256c
item_subselect.cc 71 KB