~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Brian Aker
  • Date: 2010-06-04 21:03:29 UTC
  • mto: This revision was merged to the branch mainline in revision 1600.
  • Revision ID: brian@gir-20100604210329-7lpvf03qsae8jafu
Additional current_session removal

Show diffs side-by-side

added added

removed removed

Lines of Context:
317
317
  return false;
318
318
}
319
319
 
320
 
static Item* reserved_keyword_function(const std::string &name, List<Item> *item_list)
 
320
static Item* reserved_keyword_function(Session *session, const std::string &name, List<Item> *item_list)
321
321
{
322
322
  const plugin::Function *udf= plugin::Function::get(name.c_str(), name.length());
323
323
  Item *item= NULL;
324
324
 
325
325
  if (udf)
326
326
  {
327
 
    item= Create_udf_func::s_singleton.create(current_session, udf, item_list);
 
327
    item= Create_udf_func::s_singleton.create(session, udf, item_list);
328
328
  } else {
329
329
    my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", name.c_str());
330
330
  }
3001
3001
        | CURRENT_USER optional_braces
3002
3002
          {
3003
3003
            std::string user_str("user");
3004
 
            if (! ($$= reserved_keyword_function(user_str, NULL)))
 
3004
            if (! ($$= reserved_keyword_function(YYSession, user_str, NULL)))
3005
3005
            {
3006
3006
              DRIZZLE_YYABORT;
3007
3007
            }
3062
3062
        | USER '(' ')'
3063
3063
          {
3064
3064
            std::string user_str("user");
3065
 
            if (! ($$= reserved_keyword_function(user_str, NULL)))
 
3065
            if (! ($$= reserved_keyword_function(YYSession, user_str, NULL)))
3066
3066
            {
3067
3067
              DRIZZLE_YYABORT;
3068
3068
            }
3124
3124
            args->push_back($3);
3125
3125
            args->push_back($5);
3126
3126
            args->push_back($7);
3127
 
            if (! ($$= reserved_keyword_function(reverse_str, args)))
 
3127
            if (! ($$= reserved_keyword_function(YYSession, reverse_str, args)))
3128
3128
            {
3129
3129
              DRIZZLE_YYABORT;
3130
3130
            }
3135
3135
            List<Item> *args= new (YYSession->mem_root) List<Item>;
3136
3136
            args->push_back($3);
3137
3137
            args->push_back($5);
3138
 
            if (! ($$= reserved_keyword_function(reverse_str, args)))
 
3138
            if (! ($$= reserved_keyword_function(YYSession, reverse_str, args)))
3139
3139
            {
3140
3140
              DRIZZLE_YYABORT;
3141
3141
            }
3147
3147
            args->push_back($3);
3148
3148
            args->push_back($5);
3149
3149
            args->push_back($7);
3150
 
            if (! ($$= reserved_keyword_function(reverse_str, args)))
 
3150
            if (! ($$= reserved_keyword_function(YYSession, reverse_str, args)))
3151
3151
            {
3152
3152
              DRIZZLE_YYABORT;
3153
3153
            }
3158
3158
            List<Item> *args= new (YYSession->mem_root) List<Item>;
3159
3159
            args->push_back($3);
3160
3160
            args->push_back($5);
3161
 
            if (! ($$= reserved_keyword_function(reverse_str, args)))
 
3161
            if (! ($$= reserved_keyword_function(YYSession, reverse_str, args)))
3162
3162
            {
3163
3163
              DRIZZLE_YYABORT;
3164
3164
            }
3194
3194
        | DATABASE '(' ')'
3195
3195
          {
3196
3196
            std::string database_str("database");
3197
 
            if (! ($$= reserved_keyword_function(database_str, NULL)))
 
3197
            if (! ($$= reserved_keyword_function(YYSession, database_str, NULL)))
3198
3198
            {
3199
3199
              DRIZZLE_YYABORT;
3200
3200
            }
3216
3216
            std::string reverse_str("reverse");
3217
3217
            List<Item> *args= new (YYSession->mem_root) List<Item>;
3218
3218
            args->push_back($3);
3219
 
            if (! ($$= reserved_keyword_function(reverse_str, args)))
 
3219
            if (! ($$= reserved_keyword_function(YYSession, reverse_str, args)))
3220
3220
            {
3221
3221
              DRIZZLE_YYABORT;
3222
3222
            }