~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/parser.cc

  • Committer: Brian Aker
  • Date: 2011-02-09 02:22:19 UTC
  • mto: (2152.2.1 alter-table)
  • mto: This revision was merged to the branch mainline in revision 2154.
  • Revision ID: brian@tangent.org-20110209022219-w7gp0ofcfbpjr3j3
Adding build for unique column

Show diffs side-by-side

added added

removed removed

Lines of Context:
611
611
  return DRIZZLE_TYPE_TIMESTAMP;
612
612
}
613
613
 
 
614
void buildKeyOnColumn(LEX *lex)
 
615
{
 
616
  statement::AlterTable *statement= (statement::AlterTable *)lex->statement;
 
617
 
 
618
  lex->type|= UNIQUE_KEY_FLAG;
 
619
  statement->alter_info.flags.set(ALTER_ADD_INDEX);
 
620
 
 
621
  if (lex->field())
 
622
  {
 
623
    lex->field()->mutable_constraints()->set_is_unique(true);
 
624
  }
 
625
}
 
626
 
614
627
} // namespace parser
615
628
} // namespace drizzled