• Sergey Petrunya's avatar
    BUG#912513: Wrong result (missing rows) with join_cache_hashed+materialization+semijoin=on · 9f60aa27
    Sergey Petrunya authored
    - equality substitution code was geared towards processing WHERE/ON clauses.
      that is, it assumed that it was doing substitions on the code that 
       = wasn't attached to any particular join_tab yet
       = was going to be fed to make_join_select() which would take the condition
         apart and attach various parts of it to tables inside/outside semi-joins.
    - However, somebody added equality substition for ref access. That is, if 
      we have a ref access on TBL.key=expr, they would do equality substition in
      'expr'. This possibility wasn't accounted for.
    - Fixed equality substition code by adding a mode that does equality 
      substition under assumption that the processed expression will be 
      attached to a certain particular table TBL.
    9f60aa27
sql_select.cc 708 KB