diff options
author | Alexander Barkov <bar@mariadb.com> | 2020-07-28 17:32:19 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2020-07-28 23:29:08 +0400 |
commit | 5b3b53ce36b9a05832af3a19ae8d846b6669a1f5 (patch) | |
tree | af8b06547a4466125138314a61db6e69ee743d78 /sql/protocol.cc | |
parent | 69cf6302f30e9bca7d2b0903c29fc1b26b09bcc7 (diff) | |
download | mariadb-git-5b3b53ce36b9a05832af3a19ae8d846b6669a1f5.tar.gz |
MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE()
Fixing functions CEILING and FLOOR to return
- TIME for TIME input
- DATETIME for DATETIME and TIMESTAMP input
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index 8c7eeaec90c..947ddd33d4c 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -1524,7 +1524,7 @@ bool Protocol_binary::store(MYSQL_TIME *tm, int decimals) DBUG_ASSERT(decimals == AUTO_SEC_PART_DIGITS || (decimals >= 0 && decimals <= TIME_SECOND_PART_DIGITS)); if (decimals != AUTO_SEC_PART_DIGITS) - my_time_trunc(tm, decimals); + my_datetime_trunc(tm, decimals); int4store(pos+7, tm->second_part); if (tm->second_part) length=11; |