summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-05-22 17:13:15 +0400
committerAlexander Barkov <bar@mariadb.org>2017-05-22 17:13:15 +0400
commit9b79888df82259743284501af5b156a18edc427f (patch)
tree3b73541947210fb515f61db1c630ef7a05b200ed /sql/item_timefunc.h
parentc84bbeda7f42e940553aee5377f64d2452872138 (diff)
downloadmariadb-git-9b79888df82259743284501af5b156a18edc427f.tar.gz
MDEV-12866 Out-of-range error with CREATE..SELECT..TO_SECONDS(NOW())
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 4890a2a7f08..55193bce207 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -89,16 +89,16 @@ public:
};
-class Item_func_to_seconds :public Item_long_func
+class Item_func_to_seconds :public Item_longlong_func
{
public:
- Item_func_to_seconds(THD *thd, Item *a): Item_long_func(thd, a) {}
+ Item_func_to_seconds(THD *thd, Item *a): Item_longlong_func(thd, a) {}
longlong val_int();
const char *func_name() const { return "to_seconds"; }
void fix_length_and_dec()
{
decimals=0;
- max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
+ fix_char_length(12);
maybe_null= 1;
}
enum_monotonicity_info get_monotonicity_info() const;