Skip to content
  • Tor Didriksen's avatar
    4641b4f0
    Bug#21611270 ASSERTION IN FILESORT::MAKE_SORTORDER() · 4641b4f0
    Tor Didriksen authored
    Problem: make_sortorder() asserts in debug mode: if we are
    ordering by an Item_ref, it must be an Item_direct_view_ref
    
    In 5.7, explain for the offending query (see testcase) is
    id      select_type        table   ... Extra
    1       PRIMARY            t       ... Using temporary; Using filesort
    2       DEPENDENT SUBQUERY g       ... Using index; Using filesort
    So we are sorting table 'g' rather than a derived/temporary table.
    And 'a' is a reference to the outer table.
    
    Solution: Relax the debug assert to allow 'Item_ref' objects.
    4641b4f0
    Bug#21611270 ASSERTION IN FILESORT::MAKE_SORTORDER()
    Tor Didriksen authored
    Problem: make_sortorder() asserts in debug mode: if we are
    ordering by an Item_ref, it must be an Item_direct_view_ref
    
    In 5.7, explain for the offending query (see testcase) is
    id      select_type        table   ... Extra
    1       PRIMARY            t       ... Using temporary; Using filesort
    2       DEPENDENT SUBQUERY g       ... Using index; Using filesort
    So we are sorting table 'g' rather than a derived/temporary table.
    And 'a' is a reference to the outer table.
    
    Solution: Relax the debug assert to allow 'Item_ref' objects.
Loading