bug fixed for MySqlSchemaStatVisitor & OracleSchemaStatVisitor

This commit is contained in:
温少
2012-02-13 15:24:11 +08:00
parent 317dd58e22
commit ec5ae21ecf
3 changed files with 49 additions and 4 deletions
@@ -47,8 +47,8 @@ public class MySqlSchemaStatVisitor extends MySqlASTVisitorAdapter {
}
public boolean visit(SQLExprTableSource x) {
if (x.getExpr() instanceof SQLIdentifierExpr) {
String ident = ((SQLIdentifierExpr) x.getExpr()).getName();
if (x.getExpr() instanceof SQLIdentifierExpr || x.getExpr() instanceof SQLPropertyExpr) {
String ident = x.getExpr().toString();
TableStat stat = tableStats.get(ident);
if (stat == null) {
stat = new TableStat();
@@ -54,8 +54,8 @@ public class OracleSchemaStatVisitor extends OracleASTVIsitorAdapter {
}
public boolean visit(SQLExprTableSource x) {
if (x.getExpr() instanceof SQLName) {
String ident = ((SQLName) x.getExpr()).toString();
if (x.getExpr() instanceof SQLIdentifierExpr || x.getExpr() instanceof SQLPropertyExpr) {
String ident = x.getExpr().toString();
TableStat stat = tableStats.get(ident);
if (stat == null) {
stat = new TableStat();