~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • 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:
1422
1422
          }
1423
1423
        | UNIQUE_SYM
1424
1424
          {
1425
 
            statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
1426
 
 
1427
 
            Lex->type|= UNIQUE_FLAG;
1428
 
            statement->alter_info.flags.set(ALTER_ADD_INDEX);
1429
 
 
1430
 
            if (Lex->field())
1431
 
            {
1432
 
              Lex->field()->mutable_constraints()->set_is_unique(true);
1433
 
            }
 
1425
            parser::buildKeyOnColumn(Lex);
1434
1426
          }
1435
1427
        | UNIQUE_SYM KEY_SYM
1436
1428
          {
1437
 
            statement::AlterTable *statement= (statement::AlterTable *)Lex->statement;
1438
 
 
1439
 
            Lex->type|= UNIQUE_KEY_FLAG;
1440
 
            statement->alter_info.flags.set(ALTER_ADD_INDEX);
1441
 
 
1442
 
            if (Lex->field())
1443
 
            {
1444
 
              Lex->field()->mutable_constraints()->set_is_unique(true);
1445
 
            }
 
1429
            parser::buildKeyOnColumn(Lex);
1446
1430
          }
1447
1431
        | COMMENT_SYM TEXT_STRING_sys
1448
1432
          {