diff --git a/core/src/main/java/com/alibaba/druid/sql/visitor/SchemaStatVisitor.java b/core/src/main/java/com/alibaba/druid/sql/visitor/SchemaStatVisitor.java index d404146cdb..6d9da34bf6 100644 --- a/core/src/main/java/com/alibaba/druid/sql/visitor/SchemaStatVisitor.java +++ b/core/src/main/java/com/alibaba/druid/sql/visitor/SchemaStatVisitor.java @@ -876,7 +876,8 @@ protected Column getColumn(SQLExpr expr) { SQLObject resolvedOwnerObject = propertyExpr.getResolvedOwnerObject(); if (resolvedOwnerObject instanceof SQLSubqueryTableSource || resolvedOwnerObject instanceof SQLCreateProcedureStatement - || resolvedOwnerObject instanceof SQLCreateFunctionStatement) { + || resolvedOwnerObject instanceof SQLCreateFunctionStatement + || resolvedOwnerObject instanceof SQLParameter) { table = null; } diff --git a/core/src/test/java/com/alibaba/druid/bvt/sql/oracle/create/OracleCreateProcedureTest4.java b/core/src/test/java/com/alibaba/druid/bvt/sql/oracle/create/OracleCreateProcedureTest4.java index 30173a31b0..8c439dbc07 100644 --- a/core/src/test/java/com/alibaba/druid/bvt/sql/oracle/create/OracleCreateProcedureTest4.java +++ b/core/src/test/java/com/alibaba/druid/bvt/sql/oracle/create/OracleCreateProcedureTest4.java @@ -187,9 +187,9 @@ public void test_0() throws Exception { assertTrue(visitor.getTables().containsKey(new TableStat.Name("fact_brand_provider"))); - assertEquals(23, visitor.getColumns().size()); - assertEquals(6, visitor.getConditions().size()); - assertEquals(4, visitor.getRelationships().size()); + assertEquals(22, visitor.getColumns().size()); + assertEquals(5, visitor.getConditions().size()); + assertEquals(1, visitor.getRelationships().size()); assertTrue(visitor.containsColumn("fact_brand_provider", "gyscode")); assertTrue(visitor.containsColumn("fact_brand_provider", "gysname"));