Merge remote-tracking branch 'upstream/master'

This commit is contained in:
yakolee
2014-05-30 15:19:22 +08:00
5 changed files with 90 additions and 2 deletions
@@ -253,6 +253,10 @@ public class MySqlExprParser extends SQLExprParser {
} else if ("COLLATE".equalsIgnoreCase(lexer.stringVal()) && !(expr instanceof SQLIdentifierExpr)) {
lexer.nextToken();
if (lexer.token() == Token.EQ) {
lexer.nextToken();
}
if (lexer.token() != Token.IDENTIFIER) {
throw new ParserException("syntax error");
}
@@ -384,6 +384,11 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
print(" CHARACTER SET ");
print(x.getCharSetName());
}
if (x.getCollate() != null) {
print(" COLLATE ");
print(x.getCollate());
}
if (x.getCollate() != null) {
print(" COLLATE ");
print(x.getCollate());