diff options
author | unknown <igor@olga.mysql.com> | 2007-04-03 14:32:16 -0700 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-04-03 14:32:16 -0700 |
commit | 0ee34b1ca25aa757f373857513d51d58fd7aea80 (patch) | |
tree | e90d79897083451cbc230aff17bff648cad1e287 /sql/item_cmpfunc.h | |
parent | 97c4143e3a82794dd9939e7deaebde581775f07e (diff) | |
download | mariadb-git-0ee34b1ca25aa757f373857513d51d58fd7aea80.tar.gz |
Fixed bug #27532: wrong results with ORDER/GROUP BY queries containing
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.
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index a13be83e093..132e019b4a3 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -405,6 +405,7 @@ public: negated= !negated; return this; } + bool eq(const Item *item, bool binary_cmp) const; }; |