Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
8746d743
Commit
8746d743
authored
Aug 11, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow get_format(TIMESTAMP, ...) syntax
parent
ce4e83e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
mysql-test/r/date_formats.result
mysql-test/r/date_formats.result
+3
-0
mysql-test/t/date_formats.test
mysql-test/t/date_formats.test
+1
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+7
-4
No files found.
mysql-test/r/date_formats.result
View file @
8746d743
...
@@ -379,6 +379,9 @@ a
...
@@ -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
...
...
mysql-test/t/date_formats.test
View file @
8746d743
...
@@ -206,6 +206,7 @@ drop table t1;
...
@@ -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'
));
...
...
sql/sql_yacc.yy
View file @
8746d743
...
@@ -3533,12 +3533,15 @@ interval:
...
@@ -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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment