~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Brian Aker
  • Date: 2011-01-25 00:51:34 UTC
  • mto: This revision was merged to the branch mainline in revision 2113.
  • Revision ID: brian@tangent.org-20110125005134-4q2lqcwpyj4xuwd0
Merge in the last of the sql_command/push it into the statement object
creation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4297
4297
insert:
4298
4298
          INSERT
4299
4299
          {
4300
 
            Lex->sql_command= SQLCOM_INSERT;
4301
4300
            Lex->statement= new statement::Insert(YYSession);
4302
4301
            Lex->duplicates= DUP_ERROR;
4303
4302
            init_select(Lex);
4316
4315
replace:
4317
4316
          REPLACE
4318
4317
          {
4319
 
            Lex->sql_command= SQLCOM_REPLACE;
4320
4318
            Lex->statement= new statement::Replace(YYSession);
4321
4319
            Lex->duplicates= DUP_REPLACE;
4322
4320
            init_select(Lex);
4453
4451
          UPDATE_SYM opt_ignore table_ident
4454
4452
          {
4455
4453
            init_select(Lex);
4456
 
            Lex->sql_command= SQLCOM_UPDATE;
4457
4454
            Lex->statement= new statement::Update(YYSession);
4458
4455
            Lex->lock_option= TL_UNLOCK; /* Will be set later */
4459
4456
            Lex->duplicates= DUP_ERROR;
4511
4508
delete:
4512
4509
          DELETE_SYM
4513
4510
          {
4514
 
            Lex->sql_command= SQLCOM_DELETE;
4515
4511
            Lex->statement= new statement::Delete(YYSession);
4516
4512
            init_select(Lex);
4517
4513
            Lex->lock_option= TL_WRITE_DEFAULT;
4544
4540
truncate:
4545
4541
          TRUNCATE_SYM opt_table_sym table_name
4546
4542
          {
4547
 
            Lex->sql_command= SQLCOM_TRUNCATE;
4548
4543
            Lex->statement= new statement::Truncate(YYSession);
4549
4544
            Lex->select_lex.options= 0;
4550
4545
            Lex->select_lex.init_order();
4725
4720
flush:
4726
4721
          FLUSH_SYM
4727
4722
          {
4728
 
            Lex->sql_command= SQLCOM_FLUSH;
4729
4723
            Lex->statement= new statement::Flush(YYSession);
4730
 
            Lex->type= 0;
4731
4724
          }
4732
4725
          flush_options
4733
4726
          {}
4784
4777
 
4785
4778
            Lex->value_list.empty();
4786
4779
            Lex->value_list.push_front($3);
4787
 
            Lex->sql_command= SQLCOM_KILL;
4788
4780
            Lex->statement= new statement::Kill(YYSession);
4789
4781
          }
4790
4782
        ;
4800
4792
use:
4801
4793
          USE_SYM schema_name
4802
4794
          {
4803
 
            Lex->sql_command=SQLCOM_CHANGE_DB;
4804
4795
            Lex->statement= new statement::ChangeSchema(YYSession);
4805
4796
            Lex->select_lex.db= $2.str;
4806
4797
          }
4811
4802
load:
4812
4803
          LOAD data_file
4813
4804
          {
4814
 
            Lex->sql_command= SQLCOM_LOAD;
4815
4805
            statement::Load *statement= new statement::Load(YYSession);
4816
4806
            Lex->statement= statement;
4817
4807
 
5665
5655
savepoint:
5666
5656
          SAVEPOINT_SYM savepoint_ident
5667
5657
          {
5668
 
            Lex->sql_command= SQLCOM_SAVEPOINT;
5669
5658
            Lex->statement= new statement::Savepoint(YYSession);
5670
5659
            Lex->ident= $2;
5671
5660
          }
5674
5663
release:
5675
5664
          RELEASE_SYM SAVEPOINT_SYM savepoint_ident
5676
5665
          {
5677
 
            Lex->sql_command= SQLCOM_RELEASE_SAVEPOINT;
5678
5666
            Lex->statement= new statement::ReleaseSavepoint(YYSession);
5679
5667
            Lex->ident= $3;
5680
5668
          }