summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-04-30 15:51:49 +0400
committerAlexander Barkov <bar@mariadb.com>2019-04-30 15:51:49 +0400
commit8c8bee0a5635d7f8197a148f267c04c1452b47fc (patch)
treeec46c8a00857d104ab87a14649d61128344b5977 /sql/item.cc
parent447b8ba1645435cb7d538a6f1b644cad113f4835 (diff)
downloadmariadb-git-8c8bee0a5635d7f8197a148f267c04c1452b47fc.tar.gz
MDEV-10307 CAST(11068046444225730969 AS SIGNED) does not return a warning
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index faae5c5ad03..a9139ceb0b1 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -333,6 +333,15 @@ longlong Item::val_int_unsigned_typecast_from_int()
}
+longlong Item::val_int_signed_typecast_from_int()
+{
+ longlong value= val_int();
+ if (!null_value && unsigned_flag && value < 0)
+ push_note_converted_to_negative_complement(current_thd);
+ return value;
+}
+
+
String *Item::val_string_from_date(String *str)
{
MYSQL_TIME ltime;