• unknown's avatar
    Fix bug lp:806943 · 4128ec48
    unknown authored
    Analysis:
    This bug is yet another incarnation of the generic problem
    where optimization of the outer query triggers evaluation
    of a subquery, and this evaluation performs a destructive
    change to the subquery plan. Specifically a temp table is
    created for the DISTINCT operation that replaces the
    original subquery table. Later, select_describe() attempts
    to print the table name, however, there is no corresponding
    TABLE_LIST object to the internal temp table, so we get a
    crash. Execution works fine because it is not interested in
    the corresponding TABLE_LIST object (or its name).
    
    Solution:
    Similar to other such bugs, block the evaluation of expensive
    Items in convert_const_to_int().
    4128ec48
item_cmpfunc.cc 147 KB