~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

Merge Stewart.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2979
2979
          { $$= new (YYSession->mem_root) Item_func_char(*$3); }
2980
2980
        | CURRENT_USER optional_braces
2981
2981
          {
2982
 
            $$= new (YYSession->mem_root) Item_func_current_user(Lex->current_context());
 
2982
            std::string user_str("user");
 
2983
            if (! ($$= reserved_keyword_function(user_str, NULL)))
 
2984
            {
 
2985
              DRIZZLE_YYABORT;
 
2986
            }
2983
2987
          }
2984
2988
        | DATE_SYM '(' expr ')'
2985
2989
          { $$= new (YYSession->mem_root) Item_date_typecast($3); }
3036
3040
          { $$= new (YYSession->mem_root) Item_func_trim($5,$3); }
3037
3041
        | USER '(' ')'
3038
3042
          {
3039
 
            $$= new (YYSession->mem_root) Item_func_user();
 
3043
            std::string user_str("user");
 
3044
            if (! ($$= reserved_keyword_function(user_str, NULL)))
 
3045
            {
 
3046
              DRIZZLE_YYABORT;
 
3047
            }
3040
3048
          }
3041
3049
        | YEAR_SYM '(' expr ')'
3042
3050
          { $$= new (YYSession->mem_root) Item_func_year($3); }