summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorevgen@moonbone.local <>2006-06-15 16:39:18 +0400
committerevgen@moonbone.local <>2006-06-15 16:39:18 +0400
commit2877b5ef64ed40ccfdaed3f743753d4348a7e814 (patch)
tree65cb6cadff54a2414770631bde07fba62dce68ba /sql
parentc9077f07e708f55ec4241fdb62ebd271707cb824 (diff)
downloadmariadb-git-2877b5ef64ed40ccfdaed3f743753d4348a7e814.tar.gz
item_cmpfunc.h, cast.result:
Post fix for bug#16377
Diffstat (limited to 'sql')
-rw-r--r--sql/item_cmpfunc.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 08d9de6ffd6..68852b5a5f6 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -43,11 +43,8 @@ public:
int set_compare_func(Item_bool_func2 *owner, Item_result type);
inline int set_compare_func(Item_bool_func2 *owner_arg)
{
- Item_result ar= (*a)->result_as_longlong() && (*b)->const_item() ?
- INT_RESULT : (*a)->result_type();
- Item_result br= (*b)->result_as_longlong() && (*a)->const_item() ?
- INT_RESULT : (*b)->result_type();
- return set_compare_func(owner_arg, item_cmp_type(ar, br));
+ return set_compare_func(owner_arg, item_cmp_type((*a)->result_type(),
+ (*b)->result_type()));
}
inline int set_cmp_func(Item_bool_func2 *owner_arg,
Item **a1, Item **a2,
@@ -60,11 +57,9 @@ public:
inline int set_cmp_func(Item_bool_func2 *owner_arg,
Item **a1, Item **a2)
{
- Item_result ar= (*a1)->result_as_longlong() && (*a2)->const_item() ?
- INT_RESULT : (*a1)->result_type();
- Item_result br= (*a2)->result_as_longlong() && (*a1)->const_item() ?
- INT_RESULT : (*a2)->result_type();
- return set_cmp_func(owner_arg, a1, a2, item_cmp_type(ar, br));
+ return set_cmp_func(owner_arg, a1, a2,
+ item_cmp_type((*a1)->result_type(),
+ (*a2)->result_type()));
}
inline int compare() { return (this->*func)(); }