diff options
author | unknown <tnurnberg@white.intern.koehntopp.de> | 2007-11-17 02:31:40 +0100 |
---|---|---|
committer | unknown <tnurnberg@white.intern.koehntopp.de> | 2007-11-17 02:31:40 +0100 |
commit | 1f7dceb0d7d57e82532d06d111cf6b94cced7388 (patch) | |
tree | 11c8605d39e3c1a492ffac109612a92a60fa7df0 /mysql-test | |
parent | c670190e8606f84a71f347184b2cf3df2fa9b925 (diff) | |
parent | 0420c6b908d759565a913dfd5f5a13ad6f9fe6b0 (diff) | |
download | mariadb-git-1f7dceb0d7d57e82532d06d111cf6b94cced7388.tar.gz |
Merge mysql.com:/misc/mysql/mysql-5.1-opt
into mysql.com:/misc/mysql/32180/51-32180
sql-common/my_time.c:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_time.result | 12 | ||||
-rw-r--r-- | mysql-test/t/func_time.test | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index a355d7929b5..5e3726a06d6 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1246,6 +1246,18 @@ 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 select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND); date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND) diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 5c1a5c2200b..97087abd668 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -766,6 +766,16 @@ select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1; set lc_time_names=en_US; drop table t1; +# +# Bug#32180: DATE_ADD treats datetime numeric argument as DATE +# instead of DATETIME +# + +select DATE_ADD('20071108181000', INTERVAL 1 DAY); +select DATE_ADD(20071108181000, INTERVAL 1 DAY); +select DATE_ADD('20071108', INTERVAL 1 DAY); +select DATE_ADD(20071108, INTERVAL 1 DAY); + --echo End of 5.0 tests # |