~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Stewart Smith
  • Date: 2010-03-18 11:20:28 UTC
  • mto: (1666.2.3 build)
  • mto: This revision was merged to the branch mainline in revision 1366.
  • Revision ID: stewart@flamingspork.com-20100318112028-p0vemjw0c2c03ycd
move USER() function into a plugin (loaded by default). Also, remove the special case (and completely untested) CURRENT_USER() function and just have it also point to USER(). If somebody wants CURRENT_USER() style behaviour they can add it back in with a test.

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); }