• unknown's avatar
    BUG#20420: optimizer reports wrong keys on left join with IN · 652a090a
    unknown authored
     When checking if an IN predicate can be evaluated using a key
     the optimizer makes sure that all the arguments of IN are of
     the same result type. To assure that it check whether 
     Item_func_in::array is filled in. 
     However Item_func_in::array is set if the types are
     the same AND all the arguments are compile time constants.
     Fixed by introducing Item_func_in::arg_types_compatible
     flag to allow correct checking of the desired condition.
    
    
    mysql-test/r/func_in.result:
      BUG#20420: optimizer reports wrong keys on left join with IN
       - reenabled the test case
    mysql-test/t/func_in.test:
      BUG#20420: optimizer reports wrong keys on left join with IN
       - reenabled the test case
    sql/item_cmpfunc.cc:
      BUG#20420: optimizer reports wrong keys on left join with IN
       Check the IN argument types in a correct way
    sql/item_cmpfunc.h:
      BUG#20420: optimizer reports wrong keys on left join with IN
       Check the IN argument types in a correct way
    sql/opt_range.cc:
      BUG#20420: optimizer reports wrong keys on left join with IN
       Check the IN argument types in a correct way
    652a090a
opt_range.cc 341 KB