~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/parser.cc

Move out drop keys to parser method file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
654
654
  options->set_dont_replicate(arg);
655
655
}
656
656
 
 
657
void buildAddAlterDropIndex(LEX *lex, const char *name, bool is_foreign_key)
 
658
{
 
659
  statement::AlterTable *statement= (statement::AlterTable *)lex->statement;
 
660
 
 
661
  statement->alter_info.flags.set(ALTER_DROP_INDEX);
 
662
  if (is_foreign_key)
 
663
  {
 
664
    statement->alter_info.flags.set(ALTER_FOREIGN_KEY);
 
665
    statement->alter_info.drop_list.push_back(new AlterDrop(AlterDrop::FOREIGN_KEY, name));
 
666
  }
 
667
  else
 
668
  {
 
669
    statement->alter_info.drop_list.push_back(new AlterDrop(AlterDrop::KEY, name));
 
670
  }
 
671
}
 
672
 
657
673
} // namespace parser
658
674
} // namespace drizzled