• Sergei Golubchik's avatar
    bugfix: join a=b where cast(a as type_of_b) can produce NULL · 1570c6e3
    Sergei Golubchik authored
    optimizer implicitly assumed that if `a` in `a=b` is not NULL,
    then it's safe to convert `a` to the type of `b` and search the
    result in the index(b).
    
    which is not always the case, as converting a non-null value
    to a different type might produce NULL. And searching for NULL
    in the index might find NULL there, so NULL will be equal to NULL,
    making `a=b` behave as if it was `a<=>b`
    1570c6e3
subselect_cache.result 111 KB