~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/parser.cc

  • Committer: Lee Bieber
  • Date: 2011-02-17 04:08:28 UTC
  • mfrom: (2172.3.5 drizzle-build)
  • Revision ID: kalebral@gmail.com-20110217040828-433pc76qapign1of
Merge Brian - add the DDL for replication

Show diffs side-by-side

added added

removed removed

Lines of Context:
647
647
  }
648
648
}
649
649
 
 
650
void buildReplicationOption(LEX *lex, bool arg)
 
651
{
 
652
  statement::CreateSchema *statement= (statement::CreateSchema *)lex->statement;
 
653
  message::ReplicationOptions *options= statement->schema_message.mutable_replication_options();
 
654
  options->set_dont_replicate(arg);
 
655
}
 
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
 
650
673
} // namespace parser
651
674
} // namespace drizzled