summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/item_cmpfunc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index e032974fdea..3fb19927404 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -2236,8 +2236,8 @@ int cmp_longlong(void *cmp_arg,
One of the args is unsigned and is too big to fit into the
positive signed range. Report no match.
*/
- if (a->unsigned_flag && ((ulonglong) a->val) > LONGLONG_MAX ||
- b->unsigned_flag && ((ulonglong) b->val) > LONGLONG_MAX)
+ if (a->unsigned_flag && ((ulonglong) a->val) > (ulonglong) LONGLONG_MAX ||
+ b->unsigned_flag && ((ulonglong) b->val) > (ulonglong) LONGLONG_MAX)
return a->unsigned_flag ? 1 : -1;
/*
Although the signedness differs both args can fit into the signed