~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

MergeĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2799
2799
        | '*'
2800
2800
          {
2801
2801
            Session *session= YYSession;
2802
 
            if (add_item_to_list(session,
2803
 
                                 new Item_field(&session->lex->current_select->
2804
 
                                                context,
2805
 
                                                NULL, NULL, "*")))
 
2802
            if (session->add_item_to_list( new Item_field(&session->lex->current_select->
 
2803
                                                          context,
 
2804
                                                          NULL, NULL, "*")))
2806
2805
              DRIZZLE_YYABORT;
2807
2806
            (session->lex->current_select->with_wild)++;
2808
2807
          }
2813
2812
          {
2814
2813
            Session *session= YYSession;
2815
2814
 
2816
 
            if (add_item_to_list(session, $2))
 
2815
            if (session->add_item_to_list($2))
2817
2816
              DRIZZLE_YYABORT;
2818
2817
          }
2819
2818
        | remember_name expr remember_end select_alias
2821
2820
            Session *session= YYSession;
2822
2821
            assert($1 < $3);
2823
2822
 
2824
 
            if (add_item_to_list(session, $2))
 
2823
            if (session->add_item_to_list($2))
2825
2824
              DRIZZLE_YYABORT;
2826
2825
            if ($4.str)
2827
2826
            {
4288
4287
 
4289
4288
group_list:
4290
4289
          group_list ',' order_ident order_dir
4291
 
          { if (add_group_to_list(YYSession, $3,(bool) $4)) DRIZZLE_YYABORT; }
 
4290
          { if (YYSession->add_group_to_list($3,(bool) $4)) DRIZZLE_YYABORT; }
4292
4291
        | order_ident order_dir
4293
 
          { if (add_group_to_list(YYSession, $1,(bool) $2)) DRIZZLE_YYABORT; }
 
4292
          { if (YYSession->add_group_to_list($1,(bool) $2)) DRIZZLE_YYABORT; }
4294
4293
        ;
4295
4294
 
4296
4295
olap_opt:
4333
4332
          {
4334
4333
            Session *session= YYSession;
4335
4334
            bool ascending= ($2 == 1) ? true : false;
4336
 
            if (add_order_to_list(session, $1, ascending))
 
4335
            if (session->add_order_to_list($1, ascending))
4337
4336
              DRIZZLE_YYABORT;
4338
4337
          }
4339
4338
        ;
4384
4383
 
4385
4384
order_list:
4386
4385
          order_list ',' order_ident order_dir
4387
 
          { if (add_order_to_list(YYSession, $3,(bool) $4)) DRIZZLE_YYABORT; }
 
4386
          { if (YYSession->add_order_to_list($3,(bool) $4)) DRIZZLE_YYABORT; }
4388
4387
        | order_ident order_dir
4389
 
          { if (add_order_to_list(YYSession, $1,(bool) $2)) DRIZZLE_YYABORT; }
 
4388
          { if (YYSession->add_order_to_list($1,(bool) $2)) DRIZZLE_YYABORT; }
4390
4389
        ;
4391
4390
 
4392
4391
order_dir:
4539
4538
          OUTFILE TEXT_STRING_filesystem
4540
4539
          {
4541
4540
            LEX *lex= Lex;
4542
 
            if (!(lex->exchange= new sql_exchange($2.str, 0)) ||
 
4541
            if (!(lex->exchange= new file_exchange($2.str, 0)) ||
4543
4542
                !(lex->result= new select_export(lex->exchange)))
4544
4543
              DRIZZLE_YYABORT;
4545
4544
          }
4549
4548
            LEX *lex=Lex;
4550
4549
            if (!lex->describe)
4551
4550
            {
4552
 
              if (!(lex->exchange= new sql_exchange($2.str,1)))
 
4551
              if (!(lex->exchange= new file_exchange($2.str,1)))
4553
4552
                DRIZZLE_YYABORT;
4554
4553
              if (!(lex->result= new select_dump(lex->exchange)))
4555
4554
                DRIZZLE_YYABORT;
4843
4842
update_elem:
4844
4843
          simple_ident_nospvar equal expr_or_default
4845
4844
          {
4846
 
            if (add_item_to_list(YYSession, $1) || add_value_to_list(YYSession, $3))
 
4845
            if (YYSession->add_item_to_list($1) || YYSession->add_value_to_list($3))
4847
4846
              DRIZZLE_YYABORT;
4848
4847
          }
4849
4848
        ;
5230
5229
            lex->local_file=  $5;
5231
5230
            lex->duplicates= DUP_ERROR;
5232
5231
            lex->ignore= 0;
5233
 
            if (!(lex->exchange= new sql_exchange($7.str, 0, $2)))
 
5232
            if (!(lex->exchange= new file_exchange($7.str, 0, $2)))
5234
5233
              DRIZZLE_YYABORT;
5235
5234
          }
5236
5235
          opt_duplicate INTO