diff options
author | unknown <tnurnberg@mysql.com/white.intern.koehntopp.de> | 2007-12-10 09:17:18 +0100 |
---|---|---|
committer | unknown <tnurnberg@mysql.com/white.intern.koehntopp.de> | 2007-12-10 09:17:18 +0100 |
commit | 72f5369831e3aa41f1cfff9bb3dba6cf61575041 (patch) | |
tree | 5067648e9e800cc99bd8a11076db667db85ef493 /mysql-test/t/func_time.test | |
parent | d9acf4066fb70efa0a2f21b3f43e72166d0ce425 (diff) | |
download | mariadb-git-72f5369831e3aa41f1cfff9bb3dba6cf61575041.tar.gz |
Bug#32770: LAST_DAY() returns a DATE, but somehow internally keeps track of the TIME.
LAST_DAY() says it returns a DATE, not a DATETIME, but didn't zero the time fields.
Adapted from a patch kindly supplied by Claudio Cherubino.
mysql-test/r/func_time.result:
show that LAST_DAY() returns only a DATE, not a DATETIME
mysql-test/t/func_time.test:
show that LAST_DAY() returns only a DATE, not a DATETIME
sql/item_timefunc.cc:
zero time-fields as we return only a DATE
Diffstat (limited to 'mysql-test/t/func_time.test')
-rw-r--r-- | mysql-test/t/func_time.test | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index f8249b7cf7c..b0f47e0ad56 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -797,4 +797,11 @@ select DATE_ADD(20071108181000, INTERVAL 1 DAY); select DATE_ADD('20071108', INTERVAL 1 DAY); select DATE_ADD(20071108, INTERVAL 1 DAY); +# +# Bug#32770: LAST_DAY() returns a DATE, but somehow internally keeps +# track of the TIME. +# + +select LAST_DAY('2007-12-06 08:59:19.05') - INTERVAL 1 SECOND; + --echo End of 5.0 tests |