mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
@@ -281,6 +281,11 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
char markChar = lexer.current();
|
||||
int markBp = lexer.bp();
|
||||
|
||||
List<String> comments = null;
|
||||
if (lexer.isKeepComments() && lexer.hasComment()) {
|
||||
comments = lexer.readAndResetComments();
|
||||
}
|
||||
|
||||
accept(Token.CREATE);
|
||||
|
||||
boolean replace = false;
|
||||
@@ -299,6 +304,11 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
MySqlCreateTableParser parser = new MySqlCreateTableParser(this.exprParser);
|
||||
MySqlCreateTableStatement stmt = parser.parseCrateTable(false);
|
||||
stmt.setHints(hints);
|
||||
|
||||
if (comments != null) {
|
||||
stmt.addBeforeComment(comments);
|
||||
}
|
||||
|
||||
return stmt;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user