~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Stewart Smith
  • Date: 2011-03-02 06:59:30 UTC
  • mto: (2241.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2242.
  • Revision ID: stewart@flamingspork.com-20110302065930-9gu2sy41w0omasfl
add fields, indexes and foreign keys to drop in ALTER TABLE DROP and DROP INDEX to the AlterTable protobuf message in parser

Show diffs side-by-side

added added

removed removed

Lines of Context:
1809
1809
 
1810
1810
            statement->alter_info.drop_list.push_back(new AlterDrop(AlterDrop::COLUMN, $3.str));
1811
1811
            statement->alter_info.flags.set(ALTER_DROP_COLUMN);
 
1812
            message::AlterTable::AlterTableOperation *operation;
 
1813
            operation= Lex->alter_table()->add_operations();
 
1814
            operation->set_operation(message::AlterTable::AlterTableOperation::DROP_COLUMN);
 
1815
            operation->set_drop_name($3.str);
1812
1816
          }
1813
1817
        | DROP FOREIGN KEY_SYM opt_ident
1814
1818
          {
4042
4046
            if (not Lex->current_select->add_table_to_list(Lex->session, $6, NULL,
4043
4047
                                                          TL_OPTION_UPDATING))
4044
4048
              DRIZZLE_YYABORT;
 
4049
 
 
4050
            message::AlterTable::AlterTableOperation *operation;
 
4051
            operation= Lex->alter_table()->add_operations();
 
4052
            operation->set_operation(message::AlterTable::AlterTableOperation::DROP_KEY);
 
4053
            operation->set_drop_name($4.str);
 
4054
 
4045
4055
          }
4046
4056
        | DROP DATABASE if_exists schema_name
4047
4057
          {