~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Lee Bieber
  • Date: 2010-11-14 05:18:07 UTC
  • mfrom: (1921.4.12 catalogs)
  • Revision ID: kalebral@gmail.com-20101114051807-p69h40jbsn1byf84
Merge Brian - add execute with no return

Show diffs side-by-side

added added

removed removed

Lines of Context:
373
373
  enum drizzled::enum_filetype filetype;
374
374
  enum drizzled::ha_build_method build_method;
375
375
  drizzled::message::Table::ForeignKeyConstraint::ForeignKeyOption m_fk_option;
 
376
  drizzled::execute_string_t execute_string;
376
377
}
377
378
 
378
379
%{
803
804
        IDENT_sys TEXT_STRING_sys TEXT_STRING_literal
804
805
        opt_component
805
806
        BIN_NUM TEXT_STRING_filesystem ident_or_empty
 
807
        opt_constraint constraint opt_ident
 
808
 
 
809
%type <execute_string>
806
810
        execute_var_or_string
807
 
        opt_constraint constraint opt_ident
808
811
 
809
812
%type <lex_str_ptr>
810
813
        opt_table_alias
826
829
        union_option
827
830
        start_transaction_opts opt_chain opt_release
828
831
        union_opt select_derived_init option_type2
 
832
        opt_status
 
833
        opt_concurrent
829
834
 
830
835
%type <m_fk_option>
831
836
        delete_option
4469
4474
  */
4470
4475
 
4471
4476
execute:
4472
 
       EXECUTE_SYM execute_var_or_string
 
4477
       EXECUTE_SYM execute_var_or_string opt_status opt_concurrent
4473
4478
       {
 
4479
          LEX *lex= Lex;
 
4480
          statement::Execute *statement= new(std::nothrow) statement::Execute(YYSession, $2, $3, $4);
 
4481
          lex->statement= statement;
 
4482
          if (lex->statement == NULL)
 
4483
            DRIZZLE_YYABORT;
4474
4484
       }
4475
4485
 
4476
4486
 
4477
4487
execute_var_or_string:
4478
4488
         ident_or_text
4479
4489
         {
4480
 
            LEX *lex= Lex;
4481
 
            statement::Execute *statement= new(std::nothrow) statement::Execute(YYSession);
4482
 
            lex->statement= statement;
4483
 
            if (lex->statement == NULL)
4484
 
              DRIZZLE_YYABORT;
4485
 
 
4486
 
            statement->setQuery($1);
 
4490
            $$.set($1);
4487
4491
         }
4488
4492
        | '@' ident_or_text
4489
4493
        {
4490
 
          LEX *lex= Lex;
4491
 
          statement::Execute *statement= new(std::nothrow) statement::Execute(YYSession);
4492
 
          lex->statement= statement;
4493
 
          if (lex->statement == NULL)
4494
 
            DRIZZLE_YYABORT;
4495
 
 
4496
 
          statement->setVar();
4497
 
          statement->setQuery($2);
 
4494
            $$.set($2, true);
4498
4495
        }
4499
4496
 
 
4497
opt_status:
 
4498
          /* empty */ { $$= 0; }
 
4499
        | WITH NO_SYM RETURN_SYM { $$= 1; }
 
4500
        ;
 
4501
 
 
4502
opt_concurrent:
 
4503
          /* empty */ { $$= 0; }
 
4504
        | CONCURRENT { $$= 1; }
 
4505
        ;
 
4506
 
4500
4507
/*
4501
4508
** Insert : add new data to table
4502
4509
*/