mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
@@ -214,6 +214,16 @@ public class Schema {
|
||||
}
|
||||
|
||||
public boolean visit(MySqlCreateTableStatement x) {
|
||||
SQLExprTableSource like = x.getLike();
|
||||
if (like != null) {
|
||||
SchemaObject table = repository.findTable((SQLName) like.getExpr());
|
||||
if (table != null) {
|
||||
MySqlCreateTableStatement stmt = (MySqlCreateTableStatement) table.getStatement();
|
||||
MySqlCreateTableStatement stmtCloned = stmt.clone();
|
||||
stmtCloned.setName(x.getName().clone());
|
||||
return visit((SQLCreateTableStatement) stmtCloned);
|
||||
}
|
||||
}
|
||||
visit((SQLCreateTableStatement) x);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user