bug fixed for SchemaStatVisitor.

This commit is contained in:
wenshao
2018-02-26 14:03:47 +08:00
parent 9d893f72f4
commit b439c0a0a9
4 changed files with 94 additions and 13 deletions
@@ -78,14 +78,21 @@ public class MySqlSchemaStatVisitor extends SchemaStatVisitor implements MySqlAS
repository.resolve(x);
}
setMode(x, Mode.Delete);
SQLTableSource from = x.getFrom();
if (from != null) {
from.accept(this);
}
accept(x.getFrom());
accept(x.getUsing());
x.getTableSource().accept(this);
SQLTableSource using = x.getUsing();
if (using != null) {
using.accept(this);
}
if (x.getTableSource() instanceof SQLExprTableSource) {
TableStat stat = this.getTableStat(x.getExprTableSource());
SQLTableSource tableSource = x.getTableSource();
tableSource.accept(this);
if (tableSource instanceof SQLExprTableSource) {
TableStat stat = this.getTableStat((SQLExprTableSource) tableSource);
stat.incrementDeleteCount();
}