mirror of
https://github.com/MariaDB/server.git
synced 2026-04-22 08:15:31 +02:00
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.
This commit is contained in:
parent
77fccd038f
commit
ccb75090c3
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue