diff options
author | kaa@kaamos.(none) <> | 2008-02-25 13:40:43 +0300 |
---|---|---|
committer | kaa@kaamos.(none) <> | 2008-02-25 13:40:43 +0300 |
commit | 3d7e8ddda4a16f4ff0ab899b45da0d198895d94f (patch) | |
tree | c2ea1f30543cd64fad47a0186b375100bbeec1d3 /mysql-test/t/func_time.test | |
parent | 6736c1b9e7bfde20314eeeaadb34a4f4b99c69eb (diff) | |
parent | 5a4e12cb56b367b72cf6f07d2925cdd9eea9160c (diff) | |
download | mariadb-git-3d7e8ddda4a16f4ff0ab899b45da0d198895d94f.tar.gz |
Merge kaamos.(none):/data/src/opt/bug33834/my50-bug33834
into kaamos.(none):/data/src/opt/bug33834/my51-bug33834
Diffstat (limited to 'mysql-test/t/func_time.test')
-rw-r--r-- | mysql-test/t/func_time.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 13c5da1285a..82a20cf429f 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -783,6 +783,25 @@ select DATE_ADD(20071108, INTERVAL 1 DAY); select LAST_DAY('2007-12-06 08:59:19.05') - INTERVAL 1 SECOND; +# +# Bug#33834: FRAC_SECOND: Applicability not clear in documentation +# +# Show that he use of FRAC_SECOND, for anything other than +# TIMESTAMPADD / TIMESTAMPDIFF, is a server error. + +SELECT TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18'); +SELECT TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18'); + +--error ER_PARSE_ERROR +SELECT DATE_ADD('2008-02-18', INTERVAL 1 FRAC_SECOND); +--error ER_PARSE_ERROR +SELECT DATE_SUB('2008-02-18', INTERVAL 1 FRAC_SECOND); + +--error ER_PARSE_ERROR +SELECT '2008-02-18' + INTERVAL 1 FRAC_SECOND; +--error ER_PARSE_ERROR +SELECT '2008-02-18' - INTERVAL 1 FRAC_SECOND; + --echo End of 5.0 tests # |