diff options
author | unknown <joerg@trift2.> | 2007-03-17 19:45:01 +0100 |
---|---|---|
committer | unknown <joerg@trift2.> | 2007-03-17 19:45:01 +0100 |
commit | ccb75090c3f1011bf384651e719c8c696a5137cb (patch) | |
tree | c280330ca0bfc2345d96369cb57f9418a9c5e7ca | |
parent | 77fccd038f7b6e177c7dd6d5ff28d0490589598f (diff) | |
download | mariadb-git-ccb75090c3f1011bf384651e719c8c696a5137cb.tar.gz |
Fix a failure in test "func_in" on some 64-bit big-endian hosts in first 5.0.38 builds.
sql/item_cmpfunc.cc:
Ensure both operands of a comparison are cast to "ulonglong", not just one only.
Without this, some 64-bit big-endian hosts failed test "func_in" when 5.0.38 builds were started.
Patch provided by Timothy.
-rw-r--r-- | sql/item_cmpfunc.cc | 4 |
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 |