1
0
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:
gkodinov/kgeorge@macbook.gmz
2007-02-16 13:56:06 +02:00
parent 7fd3cd9e41
commit 138e9c403e
5 changed files with 101 additions and 48 deletions

View File

@ -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)
{