db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: (DERBY-5010) [patch] bad equivalence check
Date Fri, 15 Apr 2011 15:19:58 GMT
On 4/13/2011 8:20 PM, Jayaram Subramanian wrote:
> Hi Knut,
> Sorry for the delay.. It was hectic for me for the past 2 months..
> When i placed thread.dumpstack and ran the lang.__suite, the log shows
> a lot of references to isEquivalent method..  Just attaching one of
> the example. Could you please guide me how to proceed from here
>
> With Regards
> Jayaram
>
> java.lang.Throwable
> 	at java.lang.Thread.dumpStack(Thread.java:417)
> 	at org.apache.derby.impl.sql.compile.BaseColumnNode.isEquivalent(BaseColumnNode.java:180)
> 	at org.apache.derby.impl.sql.compile.SubstituteExpressionVisitor.visit(SubstituteExpressionVisitor.java:62)
> 	at org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.java:718)
> 	at org.apache.derby.impl.sql.compile.ResultColumn.acceptChildren(ResultColumn.java:1550)
> 	at org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.java:721)
> 	at org.apache.derby.impl.sql.compile.QueryTreeNodeVector.acceptChildren(QueryTreeNodeVector.java:141)
> 	at org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.java:721)
> 	at org.apache.derby.impl.sql.compile.ResultSetNode.acceptChildren(ResultSetNode.java:1611)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.acceptChildren(FromBaseTable.java:4621)
> 	at org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.java:721)
> 	at org.apache.derby.impl.sql.compile.SingleChildResultSetNode.acceptChildren(SingleChildResultSetNode.java:611)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.acceptChildren(ProjectRestrictNode.java:1843)
> 	at org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.java:721)
> 	at org.apache.derby.impl.sql.compile.SingleChildResultSetNode.acceptChildren(SingleChildResultSetNode.java:611)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.acceptChildren(ProjectRestrictNode.java:1843)
> 	at org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.java:721)
> 	at org.apache.derby.impl.sql.compile.SingleChildResultSetNode.acceptChildren(SingleChildResultSetNode.java:611)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.acceptChildren(ProjectRestrictNode.java:1843)
> 	at org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.java:721)
> 	at org.apache.derby.impl.sql.compile.SubqueryNode.acceptChildren(SubqueryNode.java:2300)
> 	at org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.java:721)
> 	at org.apache.derby.impl.sql.compile.UnaryOperatorNode.acceptChildren(UnaryOperatorNode.java:759)
> 	at org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.java:721)
> 	at org.apache.derby.impl.sql.compile.BinaryOperatorNode.acceptChildren(BinaryOperatorNode.java:855)
> 	at org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.java:721)
> 	at org.apache.derby.impl.sql.compile.GroupByNode.addNewColumnsForAggregation(GroupByNode.java:566)
> 	at org.apache.derby.impl.sql.compile.GroupByNode.addAggregates(GroupByNode.java:245)
> 	at org.apache.derby.impl.sql.compile.GroupByNode.init(GroupByNode.java:184)
> 	at org.apache.derby.iapi.sql.compile.NodeFactory.getNode(NodeFactory.java:273)
> 	at org.apache.derby.impl.sql.compile.SelectNode.genProjectRestrict(SelectNode.java:1483)
> 	at org.apache.derby.impl.sql.compile.SelectNode.modifyAccessPaths(SelectNode.java:2123)
> 	at org.apache.derby.impl.sql.compile.SingleChildResultSetNode.modifyAccessPaths(SingleChildResultSetNode.java:439)
> 	at org.apache.derby.impl.sql.compile.SubqueryNode.modifyAccessPaths(SubqueryNode.java:1873)
> 	at org.apache.derby.impl.sql.compile.SubqueryList.modifyAccessPaths(SubqueryList.java:116)
> 	at org.apache.derby.impl.sql.compile.SelectNode.modifyAccessPaths(SelectNode.java:2051)
> 	at org.apache.derby.impl.sql.compile.SingleChildResultSetNode.modifyAccessPaths(SingleChildResultSetNode.java:439)
> 	at org.apache.derby.impl.sql.compile.SubqueryNode.modifyAccessPaths(SubqueryNode.java:1873)
> 	at org.apache.derby.impl.sql.compile.SubqueryList.modifyAccessPaths(SubqueryList.java:116)
> 	at org.apache.derby.impl.sql.compile.SelectNode.modifyAccessPaths(SelectNode.java:2051)
> 	at org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(DMLStatementNode.java:317)
> 	at org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(CursorNode.java:587)
>
>
Do any of the the full stack traces have a reference to the test 
compiling the statement. I think they should for the embedded tests. 
e.g, you will see something in the thread dump like:

at org.apache.derbyTesting.functionTests.tests.lang.<Name of 
Test>.<fixture> (Name of Test:  line number)
e.g.
     at 
org.apache.derbyTesting.functionTests.tests.lang.NullsTest.testInsert(NullsTest.java:206)

Then you can look at that test file and that line number and it will 
show us which query is giving the problem.
If there are thread dumps like that then you don't need to throw the 
exception as you mentioned in later to find the query that exercises 
this code.


Thanks

Kathey


Mime
View raw message