diff options
author | monty@mysql.com <> | 2004-04-28 17:45:08 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2004-04-28 17:45:08 +0300 |
commit | f10d098f7dc4c2f2281b8ef49e945114996b91a1 (patch) | |
tree | 44b9496a8f3b14561950eae22c33c0f3de67bd70 /mysql-test/t/func_time.test | |
parent | edc584accec0be3f99f686d1b157d5ec12428f1e (diff) | |
download | mariadb-git-f10d098f7dc4c2f2281b8ef49e945114996b91a1.tar.gz |
Fixed http address in some scripts (Bug #3460)
Output TIMESTAMP in 4.1 format for 4.1 tables (or for TIMESTAMP(19)) (portability fix)
Fixed that INTERVAL can handle big integers. (Bug #3498)
Fixed that hostname="" works identical as hostname="%" for table/column grants (Bug #3473)
Diffstat (limited to 'mysql-test/t/func_time.test')
-rw-r--r-- | mysql-test/t/func_time.test | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 99824ab121d..fffda12c14e 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -136,10 +136,27 @@ select extract(MINUTE_SECOND FROM "10:11:12"); select extract(SECOND FROM "1999-01-02 10:11:12"); select extract(MONTH FROM "2001-02-00"); +# +# Test big intervals (Bug #3498) +# +SELECT "1900-01-01 00:00:00" + INTERVAL 2147483648 SECOND; +SELECT "1900-01-01 00:00:00" + INTERVAL "1:2147483647" MINUTE_SECOND; +SELECT "1900-01-01 00:00:00" + INTERVAL "100000000:214748364700" MINUTE_SECOND;SELECT "1900-01-01 00:00:00" + INTERVAL 1<<37 SECOND; +SELECT "1900-01-01 00:00:00" + INTERVAL 1<<31 MINUTE; +SELECT "1900-01-01 00:00:00" + INTERVAL 1<<20 HOUR; + +SELECT "1900-01-01 00:00:00" + INTERVAL 1<<38 SECOND; +SELECT "1900-01-01 00:00:00" + INTERVAL 1<<33 MINUTE; +SELECT "1900-01-01 00:00:00" + INTERVAL 1<<30 HOUR; +SELECT "1900-01-01 00:00:00" + INTERVAL "1000000000:214748364700" MINUTE_SECOND; + +# +# Bug #614 (multiple extracts in where) +# + create table t1 (ctime varchar(20)); insert into t1 values ('2001-01-12 12:23:40'); select ctime, hour(ctime) from t1; -# test bug 614 (multiple extracts in where) select ctime from t1 where extract(MONTH FROM ctime) = 1 AND extract(YEAR FROM ctime) = 2001; drop table t1; |