mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +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;
|
select get_format(DATETIME, 'eur') as a;
|
||||||
a
|
a
|
||||||
%Y-%m-%d %H.%i.%s
|
%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;
|
select get_format(DATE, 'TEST') as a;
|
||||||
a
|
a
|
||||||
NULL
|
NULL
|
||||||
|
|
|
@ -206,6 +206,7 @@ drop table t1;
|
||||||
select get_format(DATE, 'USA') as a;
|
select get_format(DATE, 'USA') as a;
|
||||||
select get_format(TIME, 'internal') as a;
|
select get_format(TIME, 'internal') as a;
|
||||||
select get_format(DATETIME, 'eur') as a;
|
select get_format(DATETIME, 'eur') as a;
|
||||||
|
select get_format(TIMESTAMP, 'eur') as a;
|
||||||
select get_format(DATE, 'TEST') as a;
|
select get_format(DATE, 'TEST') as a;
|
||||||
select str_to_date('15-01-2001 12:59:59', GET_FORMAT(DATE,'USA'));
|
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_MICROSECOND_SYM { $$=INTERVAL_SECOND_MICROSECOND; }
|
||||||
| SECOND_SYM { $$=INTERVAL_SECOND; }
|
| SECOND_SYM { $$=INTERVAL_SECOND; }
|
||||||
| YEAR_MONTH_SYM { $$=INTERVAL_YEAR_MONTH; }
|
| YEAR_MONTH_SYM { $$=INTERVAL_YEAR_MONTH; }
|
||||||
| YEAR_SYM { $$=INTERVAL_YEAR; };
|
| YEAR_SYM { $$=INTERVAL_YEAR; }
|
||||||
|
;
|
||||||
|
|
||||||
date_time_type:
|
date_time_type:
|
||||||
DATE_SYM {$$=MYSQL_TIMESTAMP_DATE;}
|
DATE_SYM {$$=MYSQL_TIMESTAMP_DATE;}
|
||||||
| TIME_SYM {$$=MYSQL_TIMESTAMP_TIME;}
|
| TIME_SYM {$$=MYSQL_TIMESTAMP_TIME;}
|
||||||
| DATETIME {$$=MYSQL_TIMESTAMP_DATETIME;};
|
| DATETIME {$$=MYSQL_TIMESTAMP_DATETIME;}
|
||||||
|
| TIMESTAMP {$$=MYSQL_TIMESTAMP_DATETIME;}
|
||||||
|
;
|
||||||
|
|
||||||
table_alias:
|
table_alias:
|
||||||
/* empty */
|
/* empty */
|
||||||
|
|
Loading…
Add table
Reference in a new issue