diff options
author | unknown <tnurnberg@mysql.com/white.intern.koehntopp.de> | 2007-11-16 17:43:15 +0100 |
---|---|---|
committer | unknown <tnurnberg@mysql.com/white.intern.koehntopp.de> | 2007-11-16 17:43:15 +0100 |
commit | 5e9933d7ff7d7fdd0e8b117b0344b127d5f23ffa (patch) | |
tree | 22102c7bedd68e6dd1fe0b7f8748cc68dc3c1778 /mysql-test/r/func_time.result | |
parent | f6686659551be614c835ff5f3730e87f41e06d84 (diff) | |
download | mariadb-git-5e9933d7ff7d7fdd0e8b117b0344b127d5f23ffa.tar.gz |
Bug #32180: DATE_ADD treats datetime numeric argument as DATE instead of DATETIME
This is a regression from 2007-05-18 when code to zero out the returned struct was
added to number_to_datetime(); zero for time_type corresponds to MYSQL_TIMESTAMP_DATE.
We now explicitly set the type we return (MYSQL_TIMESTAMP_DATETIME).
mysql-test/r/func_time.result:
show that DATE_ADD() behaves the same for YYYYMMDDhhmmss given
as string and as integer.
mysql-test/t/func_time.test:
show that DATE_ADD() behaves the same for YYYYMMDDhhmmss given
as string and as integer.
sql-common/my_time.c:
explictly set return type in number_to_datetime()
Diffstat (limited to 'mysql-test/r/func_time.result')
-rw-r--r-- | mysql-test/r/func_time.result | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 74859be4d04..71234385c0d 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1270,4 +1270,16 @@ select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1; ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'concat' set lc_time_names=en_US; drop table t1; +select DATE_ADD('20071108181000', INTERVAL 1 DAY); +DATE_ADD('20071108181000', INTERVAL 1 DAY) +2007-11-09 18:10:00 +select DATE_ADD(20071108181000, INTERVAL 1 DAY); +DATE_ADD(20071108181000, INTERVAL 1 DAY) +2007-11-09 18:10:00 +select DATE_ADD('20071108', INTERVAL 1 DAY); +DATE_ADD('20071108', INTERVAL 1 DAY) +2007-11-09 +select DATE_ADD(20071108, INTERVAL 1 DAY); +DATE_ADD(20071108, INTERVAL 1 DAY) +2007-11-09 End of 5.0 tests |