summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorserg@serg.mylan <>2003-08-12 19:44:13 +0200
committerserg@serg.mylan <>2003-08-12 19:44:13 +0200
commit7c5ba4f6fa30c02033d014f44d8e18553b5c0310 (patch)
treea5dffca9f77e68504409fe0683e4f4db6311028d /sql/sql_yacc.yy
parentfc5c059f98d55d0f0542f11cf65c0ed07bb30d48 (diff)
parent62849952df209608fc9a4162b92fff6fd0de8407 (diff)
downloadmariadb-git-7c5ba4f6fa30c02033d014f44d8e18553b5c0310.tar.gz
Merge bk-internal:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy22
1 files changed, 16 insertions, 6 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index bf97dbd2265..c1b37bdba65 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -526,6 +526,9 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token UNIQUE_USERS
%token UNIX_TIMESTAMP
%token USER
+%token UTC_DATE_SYM
+%token UTC_TIME_SYM
+%token UTC_TIMESTAMP_SYM
%token WEEK_SYM
%token WHEN_SYM
%token WORK_SYM
@@ -1916,7 +1919,8 @@ select:
LEX *lex= Lex;
lex->sql_command= SQLCOM_SELECT;
lex->select_lex.resolve_mode= SELECT_LEX::SELECT_MODE;
- };
+ }
+ ;
/* Need select_init2 for subselects. */
select_init:
@@ -2373,12 +2377,12 @@ simple_expr:
| CONCAT_WS '(' expr ',' expr_list ')'
{ $$= new Item_func_concat_ws($3, *$5); }
| CURDATE optional_braces
- { $$= new Item_func_curdate(); Lex->safe_to_cache_query=0; }
+ { $$= new Item_func_curdate_local(); Lex->safe_to_cache_query=0; }
| CURTIME optional_braces
- { $$= new Item_func_curtime(); Lex->safe_to_cache_query=0; }
+ { $$= new Item_func_curtime_local(); Lex->safe_to_cache_query=0; }
| CURTIME '(' expr ')'
{
- $$= new Item_func_curtime($3);
+ $$= new Item_func_curtime_local($3);
Lex->safe_to_cache_query=0;
}
| DATE_ADD_INTERVAL '(' expr ',' interval_expr interval ')'
@@ -2540,9 +2544,9 @@ simple_expr:
{ $$= new Item_func_spatial_collection(* $3,
Geometry::wkbMultiPolygon, Geometry::wkbPolygon ); }
| NOW_SYM optional_braces
- { $$= new Item_func_now(); Lex->safe_to_cache_query=0;}
+ { $$= new Item_func_now_local(); Lex->safe_to_cache_query=0;}
| NOW_SYM '(' expr ')'
- { $$= new Item_func_now($3); Lex->safe_to_cache_query=0;}
+ { $$= new Item_func_now_local($3); Lex->safe_to_cache_query=0;}
| PASSWORD '(' expr ')'
{ $$= new Item_func_password($3); }
| PASSWORD '(' expr ',' expr ')'
@@ -2670,6 +2674,12 @@ simple_expr:
{ $$= new Item_func_unix_timestamp($3); }
| USER '(' ')'
{ $$= new Item_func_user(); Lex->safe_to_cache_query=0; }
+ | UTC_DATE_SYM optional_braces
+ { $$= new Item_func_curdate_utc(); Lex->safe_to_cache_query=0;}
+ | UTC_TIME_SYM optional_braces
+ { $$= new Item_func_curtime_utc(); Lex->safe_to_cache_query=0;}
+ | UTC_TIMESTAMP_SYM optional_braces
+ { $$= new Item_func_now_utc(); Lex->safe_to_cache_query=0;}
| WEEK_SYM '(' expr ')'
{
$$= new Item_func_week($3,new Item_int((char*) "0",