summaryrefslogtreecommitdiff
path: root/sql/item_func.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2015-01-21 12:03:02 +0100
committerSergei Golubchik <sergii@pisem.net>2015-01-21 12:03:02 +0100
commitd9c01e4b4ac6a7e2bdbcaf71819fa3d4f5269840 (patch)
tree4f86f6ce4e298430e313ed70f2225b3f29485f51 /sql/item_func.h
parentd854a254b84595b3a8f3a4d8083a2b997d59912e (diff)
parent8bc712e481a18976853fa57a7be77aab6159d431 (diff)
downloadmariadb-git-d9c01e4b4ac6a7e2bdbcaf71819fa3d4f5269840.tar.gz
5.5 merge
Diffstat (limited to 'sql/item_func.h')
-rw-r--r--sql/item_func.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/item_func.h b/sql/item_func.h
index e40f2d771c6..ce1f2fdd676 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -1,7 +1,7 @@
#ifndef ITEM_FUNC_INCLUDED
#define ITEM_FUNC_INCLUDED
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2009, 2014, SkySQL Ab.
+/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2014, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -287,7 +287,8 @@ public:
inline longlong check_integer_overflow(longlong value, bool val_unsigned)
{
if ((unsigned_flag && !val_unsigned && value < 0) ||
- (!unsigned_flag && val_unsigned && (ulonglong) value > LONGLONG_MAX))
+ (!unsigned_flag && val_unsigned &&
+ (ulonglong) value > (ulonglong) LONGLONG_MAX))
return raise_integer_overflow();
return value;
}