~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Brian Aker
  • Date: 2010-11-28 08:56:23 UTC
  • mfrom: (1958.1.2 catalogs)
  • Revision ID: brian@tangent.org-20101128085623-dray43djzamqs3n2
Merge in WAIT

Show diffs side-by-side

added added

removed removed

Lines of Context:
770
770
%token  VARIANCE_SYM
771
771
%token  VARYING                       /* SQL-2003-R */
772
772
%token  VAR_SAMP_SYM
 
773
%token  WAIT_SYM
773
774
%token  WARNINGS
774
775
%token  WEEK_SYM
775
776
%token  WHEN_SYM                      /* SQL-2003-R */
831
832
        union_opt select_derived_init option_type2
832
833
        opt_status
833
834
        opt_concurrent
 
835
        opt_wait
834
836
 
835
837
%type <m_fk_option>
836
838
        delete_option
3247
3249
          }
3248
3250
        | TRUNCATE_SYM '(' expr ',' expr ')'
3249
3251
          { $$= new (YYSession->mem_root) Item_func_round($3,$5,1); }
 
3252
        | WAIT_SYM '(' expr ')'
 
3253
          {
 
3254
            std::string wait_str("wait");
 
3255
            List<Item> *args= new (YYSession->mem_root) List<Item>;
 
3256
            args->push_back($3);
 
3257
            if (! ($$= reserved_keyword_function(YYSession, wait_str, args)))
 
3258
            {
 
3259
              DRIZZLE_YYABORT;
 
3260
            }
 
3261
          }
 
3262
        | WAIT_SYM '(' expr ',' expr ')'
 
3263
          {
 
3264
            std::string wait_str("wait");
 
3265
            List<Item> *args= new (YYSession->mem_root) List<Item>;
 
3266
            args->push_back($3);
 
3267
            args->push_back($5);
 
3268
            if (! ($$= reserved_keyword_function(YYSession, wait_str, args)))
 
3269
            {
 
3270
              DRIZZLE_YYABORT;
 
3271
            }
 
3272
          }
3250
3273
        ;
3251
3274
 
3252
3275
/*
4474
4497
  */
4475
4498
 
4476
4499
execute:
4477
 
       EXECUTE_SYM execute_var_or_string opt_status opt_concurrent
 
4500
       EXECUTE_SYM execute_var_or_string opt_status opt_concurrent opt_wait
4478
4501
       {
4479
4502
          LEX *lex= Lex;
4480
 
          statement::Execute *statement= new(std::nothrow) statement::Execute(YYSession, $2, $3, $4);
 
4503
          statement::Execute *statement= new(std::nothrow) statement::Execute(YYSession, $2, $3, $4, $5);
4481
4504
          lex->statement= statement;
4482
4505
          if (lex->statement == NULL)
4483
4506
            DRIZZLE_YYABORT;
4504
4527
        | CONCURRENT { $$= 1; }
4505
4528
        ;
4506
4529
 
 
4530
opt_wait:
 
4531
          /* empty */ { $$= 0; }
 
4532
        | WAIT_SYM { $$= 1; }
 
4533
        ;
 
4534
 
4507
4535
/*
4508
4536
** Insert : add new data to table
4509
4537
*/