mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for sql parser.
This commit is contained in:
@@ -1025,6 +1025,13 @@ public class SQLCreateTableStatement extends SQLStatementImpl implements SQLDDLS
|
||||
|
||||
x.onCommitPreserveRows = onCommitPreserveRows;
|
||||
x.onCommitDeleteRows = onCommitDeleteRows;
|
||||
|
||||
if (tableOptions != null) {
|
||||
for (Map.Entry<String, SQLObject> entry : tableOptions.entrySet()) {
|
||||
SQLObject entryVal = entry.getValue().clone();
|
||||
x.tableOptions.put(entry.getKey(), entryVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SQLName getStoredAs() {
|
||||
|
||||
+2
-2
@@ -454,7 +454,7 @@ public class MySqlCreateTableParser extends SQLCreateTableParser {
|
||||
clause.setLinear(true);
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.ALGORITHM) {
|
||||
if (lexer.identifierEquals(FnvHash.Constants.ALGORITHM)) {
|
||||
lexer.nextToken();
|
||||
accept(Token.EQ);
|
||||
clause.setAlgorithm(lexer.integerValue().shortValue());
|
||||
@@ -642,7 +642,7 @@ public class MySqlCreateTableParser extends SQLCreateTableParser {
|
||||
clause.setLinear(true);
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.ALGORITHM) {
|
||||
if (lexer.identifierEquals(FnvHash.Constants.ALGORITHM)) {
|
||||
lexer.nextToken();
|
||||
accept(Token.EQ);
|
||||
subPartitionKey.setAlgorithm(lexer.integerValue().shortValue());
|
||||
|
||||
@@ -35,7 +35,6 @@ public class MySqlLexer extends Lexer {
|
||||
|
||||
map.putAll(Keywords.DEFAULT_KEYWORDS.getKeywords());
|
||||
|
||||
map.put("ALGORITHM", Token.ALGORITHM);
|
||||
map.put("DUAL", Token.DUAL);
|
||||
map.put("FALSE", Token.FALSE);
|
||||
map.put("IDENTIFIED", Token.IDENTIFIED);
|
||||
|
||||
Reference in New Issue
Block a user