diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-10-15 17:46:25 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-10-15 17:46:25 +0400 |
commit | 22e75434e7bb0405a9e36c9c9f22b6f30f7206db (patch) | |
tree | 3ed1ff4450138aff7a77b9b4bc5e810da8aa0b6c /sql/item_timefunc.h | |
parent | a53b99bf1333722b8f30fdbba7d7a40ce2485976 (diff) | |
download | mariadb-git-22e75434e7bb0405a9e36c9c9f22b6f30f7206db.tar.gz |
MDEV-17434 EXTRACT(DAY FROM negative_time) returns wrong result
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index c1e77eae5bc..59031c69c6a 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -978,6 +978,11 @@ class Item_extract :public Item_int_func max_length= length; //QQ: see above date_value= true; } + void set_day_length(uint32 length) + { + max_length= length + 1/*sign*/; // e.g. '-24:00:00' -> -1 + date_value= true; + } void set_time_length(uint32 length) { max_length= length + 1/*sign*/; |