~thomir-deactivatedaccount/drizzle/drizzle-fix-bug653747

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Brian Aker
  • Date: 2010-10-10 02:07:52 UTC
  • mfrom: (1827.2.3 staging)
  • Revision ID: brian@tangent.org-20101010020752-ktv73isay5dxtvp3
Merge in switch on table_share_instance inheritance.

Show diffs side-by-side

added added

removed removed

Lines of Context:
521
521
%token  ESCAPED
522
522
%token  ESCAPE_SYM                    /* SQL-2003-R */
523
523
%token  EXCLUSIVE_SYM
524
 
%token  EXECUTE_SYM
525
524
%token  EXISTS                        /* SQL-2003-R */
526
525
%token  EXTENDED_SYM
527
526
%token  EXTRACT_SYM                   /* SQL-2003-N */
803
802
        IDENT_sys TEXT_STRING_sys TEXT_STRING_literal
804
803
        opt_component
805
804
        BIN_NUM TEXT_STRING_filesystem ident_or_empty
806
 
        execute_var_or_string
807
805
        opt_constraint constraint opt_ident
808
806
 
809
807
%type <lex_str_ptr>
937
935
        statement
938
936
        opt_field_or_var_spec fields_or_vars opt_load_data_set_spec
939
937
        init_key_options key_options key_opts key_opt key_using_alg
940
 
        execute
941
938
END_OF_INPUT
942
939
 
943
940
%type <index_hint> index_hint_type
1007
1004
        | delete
1008
1005
        | describe
1009
1006
        | drop
1010
 
        | execute
1011
1007
        | flush
1012
1008
        | insert
1013
1009
        | kill
4466
4462
          /* empty */ { $$= 0; }
4467
4463
        | TEMPORARY_SYM { $$= 1; }
4468
4464
        ;
4469
 
 
4470
 
/*
4471
 
  Execute a string as dynamic SQL.
4472
 
  */
4473
 
 
4474
 
execute:
4475
 
       EXECUTE_SYM
4476
 
       {
4477
 
          LEX *lex= Lex;
4478
 
          statement::Execute *statement= new(std::nothrow) statement::Execute(YYSession);
4479
 
          lex->statement= statement;
4480
 
          if (lex->statement == NULL)
4481
 
            DRIZZLE_YYABORT;
4482
 
       }
4483
 
       execute_var_or_string
4484
 
 
4485
 
 
4486
 
execute_var_or_string:
4487
 
         ident_or_text
4488
 
         {
4489
 
          statement::Execute *statement= (statement::Execute *)Lex->statement;
4490
 
          statement->setQuery($1);
4491
 
         }
4492
 
        | '@' ident_or_text
4493
 
        {
4494
 
          statement::Execute *statement= (statement::Execute *)Lex->statement;
4495
 
          statement->setVar();
4496
 
          statement->setQuery($2);
4497
 
        }
4498
 
 
4499
4465
/*
4500
4466
** Insert : add new data to table
4501
4467
*/