diff options
author | unknown <gluh@gluh.mysql.r18.ru> | 2003-12-08 14:41:41 +0400 |
---|---|---|
committer | unknown <gluh@gluh.mysql.r18.ru> | 2003-12-08 14:41:41 +0400 |
commit | 417354eaa127934f5aadcc9b245561a1519ba998 (patch) | |
tree | 9c147b6d7fd7bc40e51a59e4315562f59ccbcde0 /mysql-test/r/keywords.result | |
parent | 4379cbcf3056a33f41ddf489828203a6c03e793f (diff) | |
download | mariadb-git-417354eaa127934f5aadcc9b245561a1519ba998.tar.gz |
WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
Syntax for TIMESTAMPADD:
TIMESTAMPADD(interval, integer_expression, datetime_expression)
interval:= FRAC_SECOND | SECOND | MINUTE | HOUR | DAY | WEEK | MONTH |
QUARTER | YEAR
Supported SQL_TSI_ prefix (like SQL_TSI_SECOND)
Syntax for TIMESTAMPDIFF:
TIMESTAMPDIFF(interval, datetime_expression1, datetime_expression2)
interval:= FRAC_SECOND | SECOND | MINUTE | HOUR | DAY | WEEK | MONTH |
QUARTER | YEAR
Supported SQL_TSI_ prefix (like SQL_TSI_SECOND)
mysql-test/r/func_sapdb.result:
Additional tests for timediff
mysql-test/r/func_time.result:
Tests for timestampadd, timestampdiff functions
mysql-test/r/keywords.result:
Test for new keywords
mysql-test/t/func_sapdb.test:
Additional tests for timediff
mysql-test/t/func_time.test:
Tests for timestampadd, timestampdiff functions
mysql-test/t/keywords.test:
Test for new keywords
sql/item_create.cc:
WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
sql/item_create.h:
WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
sql/item_timefunc.cc:
WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
sql/item_timefunc.h:
WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
sql/lex.h:
WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
sql/sql_yacc.yy:
WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
Diffstat (limited to 'mysql-test/r/keywords.result')
-rw-r--r-- | mysql-test/r/keywords.result | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/mysql-test/r/keywords.result b/mysql-test/r/keywords.result index c218379110f..88a0ab8abd5 100644 --- a/mysql-test/r/keywords.result +++ b/mysql-test/r/keywords.result @@ -1,12 +1,14 @@ drop table if exists t1; -create table t1 (time time, date date, timestamp timestamp); -insert into t1 values ("12:22:22","97:02:03","1997-01-02"); +create table t1 (time time, date date, timestamp timestamp, +quarter int, week int, year int, timestampadd int, timestampdiff int); +insert into t1 values ("12:22:22","97:02:03","1997-01-02",1,2,3,4,5); select * from t1; -time date timestamp -12:22:22 1997-02-03 1997-01-02 00:00:00 -select t1.time+0,t1.date+0,t1.timestamp+0,concat(date," ",time) from t1; -t1.time+0 t1.date+0 t1.timestamp+0 concat(date," ",time) -122222 19970203 19970102000000 1997-02-03 12:22:22 +time date timestamp quarter week year timestampadd timestampdiff +12:22:22 1997-02-03 1997-01-02 00:00:00 1 2 3 4 5 +select t1.time+0,t1.date+0,t1.timestamp+0,concat(date," ",time), +t1.quarter+t1.week, t1.year+timestampadd, timestampdiff from t1; +t1.time+0 t1.date+0 t1.timestamp+0 concat(date," ",time) t1.quarter+t1.week t1.year+timestampadd timestampdiff +122222 19970203 19970102000000 1997-02-03 12:22:22 3 7 5 drop table t1; create table events(binlog int); insert into events values(1); |