• Sergey Glukhov's avatar
    Bug#51598 Inconsistent behaviour with a COALESCE statement inside an IN comparison · d1c2e850
    Sergey Glukhov authored
    Optimizer erroneously translated LEFT JOIN into INNER JOIN.
    It leads to cutting rows with NULL right side. It happens
    because Item_row uses not_null_tables() method form the
    base(Item) class and does not calculate 'null tables'
    properly. The fix is adding calculation of 'not null tables'
    to Item_row.
    
    
    mysql-test/r/join_outer.result:
      test result
    mysql-test/t/join_outer.test:
      test case
    sql/item_row.cc:
      adding calculation of 'not null tables' to Item_row.
    sql/item_row.h:
      adding calculation of 'not null tables' to Item_row.
    d1c2e850
item_row.h 2.53 KB