• Sergey Petrunia's avatar
    BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result · a9608b19
    Sergey Petrunia authored
    Item_in_optimizer::is_null() evaluated "NULL IN (SELECT ...)" to NULL regardless of
    whether subquery produced any records, this was a documented limitation.
    
    The limitation has been removed (see bugs 8804, 24085, 24127) now
    Item_in_optimizer::val_int() correctly handles all cases with NULLs. Make
    Item_in_optimizer::is_null() invoke val_int() to return correct values for
    "NULL IN (SELECT ...)".
    
    
    mysql-test/r/subselect.result:
      BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result
      - Testcase
    mysql-test/t/subselect.test:
      BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result
      - Testcase
    a9608b19
subselect.test 124 KB