• unknown's avatar
    Fixed bug #26963: invalid optimization of the pushdown conditions · bd39e4ba
    unknown authored
    after single-row table substitution could lead to a wrong result set.
    The bug happened because the function Item_field::replace_equal_field
    erroniously assumed that any field included in a multiple equality
    with a constant has been already substituted for this constant.
    This not true for fields becoming constant after row substitutions
    for constant tables.
     
    
    
    mysql-test/r/select.result:
      Added a test case for bug #26963.
    mysql-test/t/select.test:
      Added a test case for bug #26963.
    sql/item.cc:
      Fixed bug #26963: invalid optimization of the pushdown conditions
      after single-row table substitution could lead to a wrong result set.
      The bug happened because the function Item_field::replace_equal_field
      erroneously assumed that any field included in a multiple equality
      with a constant has been already substituted for this constant.
      This not true for fields becoming constant after row substitutions
      for constant tables.
    bd39e4ba
item.cc 181 KB