• igor@olga.mysql.com's avatar
    Fixed bug #33833. · 5e14047e
    igor@olga.mysql.com authored
    Two disjuncts containing equalities of the form key=const1 and key=const2 can
    be merged into one if const1 is equal to const2. To check it the common 
    collation of the constants were used rather than the collation of the field key.
    For example when the default collation of the constants was cases insensitive
    while the collation of the field was case sensitive, then two or-ed equality 
    predicates key='b' and key='B' incorrectly were merged into one f='b'. As a 
    result ref access was used instead of range access and wrong result sets were 
    returned in many cases. 
    Fixed the problem by comparing constant in the or-ed predicate with collation of
    the key field.
    5e14047e
sql_select.cc 499 KB