• igor@olga.mysql.com's avatar
    Fixed bug #24653. · 36df33d8
    igor@olga.mysql.com authored
    The bug report has demonstrated the following two problems.
    1. If an ORDER/GROUP BY list includes a constant expression being 
    optimized away and, at the same time, containing single-row
    subselects that return more that one row, no error is reported.
    Strictly speaking the standard allows to ignore error in this case.
    Yet, now a corresponding fatal error is reported in this case.
    2. If a query requires sorting by expressions containing single-row
    subselects that, however, return more than one row, then the execution
    of the query may cause a server crash. 
    To fix this some code has been added that blocks execution of a subselect
    item in case of a fatal error in the method Item_subselect::exec.
    36df33d8
item_cmpfunc.h 30.5 KB