• Sergey Petrunya's avatar
    BUG#822134: Invalid plan and wrong result set for Q20 from DBT3 benchmark set · 81335120
    Sergey Petrunya authored
    - create_ref_for_key() has the code that walks KEYUSE array and tries to use
      maximum number of keyparts for ref (and eq_ref and ref_or_null) access.
      When one constructs ref access for table that is inside a SJ-Materialization
      nest, it is not possible to use tables that are ouside the nest (because 
      materialization is performed before they have any "current value").
      The bug was caused by this function not taking this into account.
    81335120
sql_select.cc 695 KB