mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
allow get_format(TIMESTAMP, ...) syntax
This commit is contained in:
parent
8ce4dc97c5
commit
902518ae48
3 changed files with 11 additions and 4 deletions
|
@ -379,6 +379,9 @@ a
|
|||
select get_format(DATETIME, 'eur') as a;
|
||||
a
|
||||
%Y-%m-%d %H.%i.%s
|
||||
select get_format(TIMESTAMP, 'eur') as a;
|
||||
a
|
||||
%Y-%m-%d %H.%i.%s
|
||||
select get_format(DATE, 'TEST') as a;
|
||||
a
|
||||
NULL
|
||||
|
|
|
@ -206,6 +206,7 @@ drop table t1;
|
|||
select get_format(DATE, 'USA') as a;
|
||||
select get_format(TIME, 'internal') as a;
|
||||
select get_format(DATETIME, 'eur') as a;
|
||||
select get_format(TIMESTAMP, 'eur') as a;
|
||||
select get_format(DATE, 'TEST') as a;
|
||||
select str_to_date('15-01-2001 12:59:59', GET_FORMAT(DATE,'USA'));
|
||||
|
||||
|
|
|
@ -3533,12 +3533,15 @@ interval:
|
|||
| SECOND_MICROSECOND_SYM { $$=INTERVAL_SECOND_MICROSECOND; }
|
||||
| SECOND_SYM { $$=INTERVAL_SECOND; }
|
||||
| YEAR_MONTH_SYM { $$=INTERVAL_YEAR_MONTH; }
|
||||
| YEAR_SYM { $$=INTERVAL_YEAR; };
|
||||
| YEAR_SYM { $$=INTERVAL_YEAR; }
|
||||
;
|
||||
|
||||
date_time_type:
|
||||
DATE_SYM {$$=MYSQL_TIMESTAMP_DATE;}
|
||||
| TIME_SYM {$$=MYSQL_TIMESTAMP_TIME;}
|
||||
| DATETIME {$$=MYSQL_TIMESTAMP_DATETIME;};
|
||||
DATE_SYM {$$=MYSQL_TIMESTAMP_DATE;}
|
||||
| TIME_SYM {$$=MYSQL_TIMESTAMP_TIME;}
|
||||
| DATETIME {$$=MYSQL_TIMESTAMP_DATETIME;}
|
||||
| TIMESTAMP {$$=MYSQL_TIMESTAMP_DATETIME;}
|
||||
;
|
||||
|
||||
table_alias:
|
||||
/* empty */
|
||||
|
|
Loading…
Add table
Reference in a new issue