~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Monty Taylor
  • Date: 2010-12-24 07:15:43 UTC
  • mto: This revision was merged to the branch mainline in revision 2029.
  • Revision ID: mordred@inaugust.com-20101224071543-ab082y5circku6v5
Renamed things prefixed mysql_ or mysqld_

Show diffs side-by-side

added added

removed removed

Lines of Context:
268
268
  }
269
269
  /* This counter shouldn't be incremented for UNION parts */
270
270
  lex->nest_level--;
271
 
  if (mysql_new_select(lex, 0))
 
271
  if (new_select(lex, 0))
272
272
    return true;
273
 
  mysql_init_select(lex);
 
273
  init_select(lex);
274
274
  lex->current_select->linkage=UNION_TYPE;
275
275
  if (is_union_distinct) /* UNION DISTINCT - remember position */
276
276
    lex->current_select->master_unit()->union_distinct=
1195
1195
              is created correctly in this case
1196
1196
            */
1197
1197
            lex->current_select->table_list.save_and_clear(&lex->save_list);
1198
 
            mysql_init_select(lex);
 
1198
            init_select(lex);
1199
1199
            lex->current_select->parsing_place= SELECT_LIST;
1200
1200
          }
1201
1201
          select_options select_item_list
2605
2605
            LEX *lex= Lex;
2606
2606
            Select_Lex *sel= lex->current_select;
2607
2607
            if (sel->linkage != UNION_TYPE)
2608
 
              mysql_init_select(lex);
 
2608
              init_select(lex);
2609
2609
            lex->current_select->parsing_place= SELECT_LIST;
2610
2610
          }
2611
2611
          select_options select_item_list
4018
4018
            LEX *lex= Lex;
4019
4019
            Select_Lex *sel= lex->current_select;
4020
4020
            if (sel->linkage != UNION_TYPE)
4021
 
              mysql_init_select(lex);
 
4021
              init_select(lex);
4022
4022
            lex->current_select->parsing_place= SELECT_LIST;
4023
4023
          }
4024
4024
          select_options select_item_list
4064
4064
              DRIZZLE_YYABORT;
4065
4065
            }
4066
4066
            if (lex->current_select->linkage == GLOBAL_OPTIONS_TYPE ||
4067
 
                mysql_new_select(lex, 1))
 
4067
                new_select(lex, 1))
4068
4068
              DRIZZLE_YYABORT;
4069
 
            mysql_init_select(lex);
 
4069
            init_select(lex);
4070
4070
            lex->current_select->linkage= DERIVED_TABLE_TYPE;
4071
4071
            lex->current_select->parsing_place= SELECT_LIST;
4072
4072
          }
4672
4672
            if (lex->statement == NULL)
4673
4673
              DRIZZLE_YYABORT;
4674
4674
            lex->duplicates= DUP_ERROR;
4675
 
            mysql_init_select(lex);
 
4675
            init_select(lex);
4676
4676
            /* for subselects */
4677
4677
            lex->lock_option= TL_READ;
4678
4678
          }
4694
4694
            if (lex->statement == NULL)
4695
4695
              DRIZZLE_YYABORT;
4696
4696
            lex->duplicates= DUP_REPLACE;
4697
 
            mysql_init_select(lex);
 
4697
            init_select(lex);
4698
4698
          }
4699
4699
          insert2
4700
4700
          {
4828
4828
          UPDATE_SYM opt_ignore table_ident
4829
4829
          {
4830
4830
            LEX *lex= Lex;
4831
 
            mysql_init_select(lex);
 
4831
            init_select(lex);
4832
4832
            lex->sql_command= SQLCOM_UPDATE;
4833
4833
            lex->statement= new(std::nothrow) statement::Update(YYSession);
4834
4834
            if (lex->statement == NULL)
4851
4851
            /*
4852
4852
              In case of multi-update setting write lock for all tables may
4853
4853
              be too pessimistic. We will decrease lock level if possible in
4854
 
              mysql_multi_update().
 
4854
              multi_update().
4855
4855
            */
4856
4856
            Lex->current_select->set_lock_for_tables(TL_WRITE_DEFAULT);
4857
4857
          }
4896
4896
            lex->statement= new(std::nothrow) statement::Delete(YYSession);
4897
4897
            if (lex->statement == NULL)
4898
4898
              DRIZZLE_YYABORT;
4899
 
            mysql_init_select(lex);
 
4899
            init_select(lex);
4900
4900
            lex->lock_option= TL_WRITE_DEFAULT;
4901
4901
            lex->ignore= 0;
4902
4902
            lex->select_lex.init_order();
4950
4950
            LEX *lex=Lex;
4951
4951
            lex->wild=0;
4952
4952
            lex->lock_option= TL_READ;
4953
 
            mysql_init_select(lex);
 
4953
            init_select(lex);
4954
4954
            lex->current_select->parsing_place= SELECT_LIST;
4955
4955
          }
4956
4956
          show_param
5511
5511
            statement::Show *select;
5512
5512
            LEX *lex= Lex;
5513
5513
            lex->lock_option= TL_READ;
5514
 
            mysql_init_select(lex);
 
5514
            init_select(lex);
5515
5515
            lex->current_select->parsing_place= SELECT_LIST;
5516
5516
            lex->sql_command= SQLCOM_SELECT;
5517
5517
            select= new(std::nothrow) statement::Show(session);
6346
6346
            lex->statement= statement;
6347
6347
            if (lex->statement == NULL)
6348
6348
              DRIZZLE_YYABORT;
6349
 
            mysql_init_select(lex);
 
6349
            init_select(lex);
6350
6350
            lex->option_type=OPT_SESSION;
6351
6351
            lex->var_list.empty();
6352
6352
          }
6702
6702
              (SELECT .. ) UNION ...  becomes
6703
6703
              SELECT * FROM ((SELECT ...) UNION ...)
6704
6704
            */
6705
 
            if (mysql_new_select(Lex, 1))
 
6705
            if (new_select(Lex, 1))
6706
6706
              DRIZZLE_YYABORT;
6707
6707
          }
6708
6708
        ;