Skip to content
  • Sreeharsha Ramanavarapu's avatar
    497bafdd
    Bug #26432173: INCORRECT SUBQUERY OPTIMIZATION WITH · 497bafdd
    Sreeharsha Ramanavarapu authored
                   LEFT JOIN(SUBQUERY) AND ORDER BY
    
    
    Issue:
    ------
    This bug can occur when:
    - there is more than one inner tables in the join nest.
    - an Item_direct_view_ref object references a column
      from a const (system) table.
    
    This has caused the following regressions :
    Bug# 26596977, Bug# 26616066 and Bug# 26618455
    
    Fix for 8.0:
    -----------
    When the object is of type FIELD_ITEM (i.e. belongs to a
    table), Item_direct_view_ref::used_tables should return the
    related table's map. In other cases it returns the first
    inner table's map.
    
    Fix for 5.7:
    ------------
    The function Item_direct_view_ref::used_tables has been
    removed and the fix will limited to handle the problem in
    temporary tables.
    
    While creating fields for the temporary table, consider
    field as constant only if:
    1) The item is constant and
       1a) Isn't part of a derived table (or view). OR
       1b) The item belongs to a derived table (or view) and it
           doesn't belong to an inner table of an outer join.
    497bafdd
    Bug #26432173: INCORRECT SUBQUERY OPTIMIZATION WITH
    Sreeharsha Ramanavarapu authored
                   LEFT JOIN(SUBQUERY) AND ORDER BY
    
    
    Issue:
    ------
    This bug can occur when:
    - there is more than one inner tables in the join nest.
    - an Item_direct_view_ref object references a column
      from a const (system) table.
    
    This has caused the following regressions :
    Bug# 26596977, Bug# 26616066 and Bug# 26618455
    
    Fix for 8.0:
    -----------
    When the object is of type FIELD_ITEM (i.e. belongs to a
    table), Item_direct_view_ref::used_tables should return the
    related table's map. In other cases it returns the first
    inner table's map.
    
    Fix for 5.7:
    ------------
    The function Item_direct_view_ref::used_tables has been
    removed and the fix will limited to handle the problem in
    temporary tables.
    
    While creating fields for the temporary table, consider
    field as constant only if:
    1) The item is constant and
       1a) Isn't part of a derived table (or view). OR
       1b) The item belongs to a derived table (or view) and it
           doesn't belong to an inner table of an outer join.
Loading