Commit 8746d743 authored by unknown's avatar unknown

allow get_format(TIMESTAMP, ...) syntax

parent ce4e83e3
......@@ -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;};
| DATETIME {$$=MYSQL_TIMESTAMP_DATETIME;}
| TIMESTAMP {$$=MYSQL_TIMESTAMP_DATETIME;}
;
table_alias:
/* empty */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment