• Igor Babaev's avatar
    MDEV-25679 Wrong result selecting from simple view with LIMIT and ORDER BY · cc0bd843
    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.
    cc0bd843
derived_view.result 129 KB