if (lexer.token() == Token.LPAREN) {
lexer.nextToken();
for (;;) {
acceptIdentifier("PARTITION");
MySqlPartitioningDef partitionDef = new MySqlPartitioningDef();
partitionDef.setName(this.exprParser.name());
if (lexer.token() == Token.VALUES) {
lexer.nextToken();
if (lexer.token() == Token.IN) {
lexer.nextToken();
MySqlPartitioningDef.InValues values = new MySqlPartitioningDef.InValues();
accept(Token.LPAREN);
this.exprParser.exprList(values.getItems(), values);
accept(Token.RPAREN);
partitionDef.setValues(values);
} else {
acceptIdentifier("LESS");
acceptIdentifier("THAN");
MySqlPartitioningDef.LessThanValues values = new MySqlPartitioningDef.LessThanValues();
accept(Token.LPAREN);
this.exprParser.exprList(values.getItems(), values);
accept(Token.RPAREN);
partitionDef.setValues(values);
}
}
for (;;) {
if (identifierEquals("DATA")) {
lexer.nextToken();
acceptIdentifier("DIRECTORY");
if (lexer.token() == Token.EQ) {
lexer.nextToken();
}
partitionDef.setDataDirectory(this.exprParser.expr());
} else if (lexer.token() == Token.INDEX) {
lexer.nextToken();
acceptIdentifier("DIRECTORY");
if (lexer.token() == Token.EQ) {
lexer.nextToken();
}
partitionDef.setIndexDirectory(this.exprParser.expr());
} else {
break;
}
}