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 /mysql-test/main/type_timestamp_hires.test | |
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 'mysql-test/main/type_timestamp_hires.test')
-rw-r--r-- | mysql-test/main/type_timestamp_hires.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/main/type_timestamp_hires.test b/mysql-test/main/type_timestamp_hires.test index f2e765d09fe..27aed16d6be 100644 --- a/mysql-test/main/type_timestamp_hires.test +++ b/mysql-test/main/type_timestamp_hires.test @@ -107,6 +107,16 @@ DROP TABLE t1; SET time_zone=DEFAULT; + +--echo # +--echo # MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE() +--echo # + +CREATE TABLE t1 (a TIMESTAMP NOT NULL); +CREATE TABLE t2 AS SELECT FLOOR(a), CEILING(a) FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE t1, t2; + --echo # --echo # End of 10.4 tests --echo # |