Commit ccb75090 authored by unknown's avatar unknown
Browse files

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.
parent 77fccd03
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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