• unknown's avatar
    Fixed bug #27532: wrong results with ORDER/GROUP BY queries containing · 0ee34b1c
    unknown authored
    IN/BETWEEN predicates in sorting expressions.
    Wrong results may occur when the select list contains an expression
    with IN/BETWEEN predicate that differs from a sorting expression by
    an additional NOT only.
     
    Added the method Item_func_opt_neg::eq to compare correctly expressions
    containing [NOT] IN/BETWEEN.
    The eq method inherited from the Item_func returns TRUE when comparing
    'a IN (1,2)' with 'a NOT IN (1,2)' that is not, of course, correct.  
    
    
    mysql-test/r/order_by.result:
      Added a test case for bug #27532.
    mysql-test/t/order_by.test:
      Added a test case for bug #27532.
    sql/item_cmpfunc.cc:
      Fixed bug #27532.
      Added the method Item_func_opt_neg::eq to compare correctly expressions
      containing [NOT] IN/BETWEEN.
      The eq method inherited from the Item_func returns TRUE when comparing
      'a IN (1,2)' with 'a NOT IN (1,2)' that is not, of course, correct.
    sql/item_cmpfunc.h:
      Added the method Item_func_opt_neg::eq to compare correctly expressions
      containing [NOT] IN/BETWEEN.
      The eq method inherited from the Item_func returns TRUE when comparing
      'a IN (1,2)' with 'a NOT IN (1,2)' that is not, of course, correct.
    0ee34b1c
item_cmpfunc.cc 72 KB