• Igor Babaev's avatar
    MDEV-25679 Wrong result selecting from simple view with LIMIT and ORDER BY · 6e94ef41
    Igor Babaev authored
    This bug affected queries with views / derived_tables / CTEs whose
    specifications were of the form
      (SELECT ... LIMIT <n>) ORDER BY ...
    Units representing such specifications contains one SELECT_LEX structure
    for (SELECT ... LIMIT <n>) and additionally SELECT_LEX structure for
    fake_select_lex. This fact should have been taken into account in the
    function mysql_derived_fill().
    
    This patch has to be applied to 10.2 and 10.3 only.
    6e94ef41
sql_derived.cc 47.9 KB