~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
#include <drizzled/alter_info.h>
45
45
#include <drizzled/item/subselect.h>
46
46
#include <drizzled/table_ident.h>
 
47
#include <drizzled/var.h>
47
48
 
48
49
int yylex(union ParserType *yylval, drizzled::Session *session);
49
50
 
4282
4283
        | '(' fields ')' insert_values {}
4283
4284
        | SET_SYM
4284
4285
          {
4285
 
            if (not (Lex.insert_list = new List_item) ||
4286
 
                Lex.many_values.push_back(Lex.insert_list))
4287
 
              DRIZZLE_YYABORT;
 
4286
            Lex.insert_list = new List_item;
 
4287
            Lex.many_values.push_back(Lex.insert_list);
4288
4288
          }
4289
4289
          ident_eq_list
4290
4290
        ;
4322
4322
ident_eq_value:
4323
4323
          simple_ident equal expr_or_default
4324
4324
          {
4325
 
            if (Lex.field_list.push_back($1) ||
4326
 
                Lex.insert_list->push_back($3))
4327
 
              DRIZZLE_YYABORT;
 
4325
            Lex.field_list.push_back($1);
 
4326
            Lex.insert_list->push_back($3);
4328
4327
          }
4329
4328
        ;
4330
4329
 
4346
4345
          }
4347
4346
          opt_values ')'
4348
4347
          {
4349
 
            if (Lex.many_values.push_back(Lex.insert_list))
4350
 
              DRIZZLE_YYABORT;
 
4348
            Lex.many_values.push_back(Lex.insert_list);
4351
4349
          }
4352
4350
        ;
4353
4351
 
4359
4357
values:
4360
4358
          values ','  expr_or_default
4361
4359
          {
4362
 
            if (Lex.insert_list->push_back($3))
4363
 
              DRIZZLE_YYABORT;
 
4360
            Lex.insert_list->push_back($3);
4364
4361
          }
4365
4362
        | expr_or_default
4366
4363
          {
4367
 
            if (Lex.insert_list->push_back($1))
4368
 
              DRIZZLE_YYABORT;
 
4364
            Lex.insert_list->push_back($1);
4369
4365
          }
4370
4366
        ;
4371
4367
 
4430
4426
insert_update_elem:
4431
4427
          simple_ident equal expr_or_default
4432
4428
          {
4433
 
          if (Lex.update_list.push_back($1) ||
4434
 
              Lex.value_list.push_back($3))
4435
 
              DRIZZLE_YYABORT;
 
4429
                        Lex.update_list.push_back($1);
 
4430
            Lex.value_list.push_back($3);
4436
4431
          }
4437
4432
        ;
4438
4433
 
4445
4440
            init_select(&Lex);
4446
4441
            Lex.lock_option= TL_WRITE_DEFAULT;
4447
4442
            Lex.select_lex.init_order();
4448
 
 
4449
 
            if (!Lex.current_select->add_table_to_list(YYSession, $4, NULL, TL_OPTION_UPDATING,
4450
 
                                           Lex.lock_option))
4451
 
              DRIZZLE_YYABORT;
 
4443
            Lex.current_select->add_table_to_list(YYSession, $4, NULL, TL_OPTION_UPDATING, Lex.lock_option);
4452
4444
          }
4453
4445
          where_clause opt_order_clause
4454
4446
          delete_limit_clause {}