~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Brian Aker
  • Date: 2009-08-04 02:33:47 UTC
  • mto: (1108.2.1 merge)
  • mto: This revision was merged to the branch mainline in revision 1109.
  • Revision ID: brian@gaz-20090804023347-z0ciilv9f2exhlws
Removal multi-update/delete

Show diffs side-by-side

added added

removed removed

Lines of Context:
4537
4537
/* Update rows in a table */
4538
4538
 
4539
4539
update:
4540
 
          UPDATE_SYM
 
4540
          UPDATE_SYM opt_ignore table_ident
4541
4541
          {
4542
4542
            LEX *lex= Lex;
4543
4543
            mysql_init_select(lex);
4544
4544
            lex->sql_command= SQLCOM_UPDATE;
4545
4545
            lex->lock_option= TL_UNLOCK; /* Will be set later */
4546
4546
            lex->duplicates= DUP_ERROR; 
 
4547
            if (!lex->select_lex.add_table_to_list(YYSession, $3, NULL,0))
 
4548
              DRIZZLE_YYABORT;
4547
4549
          }
4548
 
          opt_ignore esc_table_ref
4549
4550
          SET update_list
4550
4551
          {
4551
4552
            LEX *lex= Lex;
4552
 
            if (lex->select_lex.table_list.elements > 1)
4553
 
              lex->sql_command= SQLCOM_UPDATE_MULTI;
4554
 
            else if (lex->select_lex.get_table_list()->derived)
 
4553
            if (lex->select_lex.get_table_list()->derived)
4555
4554
            {
4556
4555
              /* it is single table update and it is update of derived table */
4557
4556
              my_error(ER_NON_UPDATABLE_TABLE, MYF(0),