mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
BUG#20420: optimizer reports wrong keys on left join with IN
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.
This commit is contained in:
@ -4928,8 +4928,8 @@ static SEL_TREE *get_func_mm_tree(RANGE_OPT_PARAM *param, Item_func *cond_func,
|
||||
type. Tree won't be built for values with different result types,
|
||||
so we check it here to avoid unnecessary work.
|
||||
*/
|
||||
if (!func->array)
|
||||
break;
|
||||
if (!func->arg_types_compatible)
|
||||
break;
|
||||
|
||||
if (inv)
|
||||
{
|
||||
|
Reference in New Issue
Block a user