db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jayaram Subramanian <rsjay1...@gmail.com>
Subject Re: (DERBY-5010) [patch] bad equivalence check
Date Sun, 17 Apr 2011 03:23:53 GMT
Hi all,
In continuation of below email,  i tried to something like
System.out.println(sqlIn.toString());

in the scripttestcase.java's runtest method  expecting that sql
statements would be sent to logs... But i couldnt see any sql
statements in the logs..

with regards
Jayaram

On Sat, Apr 16, 2011 at 9:41 PM, Jayaram Subramanian
<rsjay1976@gmail.com> wrote:
> Thanks all,
> When i see the logs i am seeing that the test which calls isequivalent method is
>
> org.apache.derbyTesting.functionTests.util.ScriptTestCase.runTest(ScriptTestCase.java:188)
>
> The line 188 in scripttestcase has
> org.apache.derby.tools.ij.runScript(
>                                conn,
>                                sqlIn,
>                                inputEncoding,
>                getOutputStream(),
>                                outputEnc,
>                useSystemProperties);
>
>
> i will try to direct the sqlin to the logs and try to find out the sql
> which gets executed
>
> With Regards
> Jayaram
>
>
> On Fri, Apr 15, 2011 at 10:19 AM, Kathey Marsden
> <kmarsdenderby@sbcglobal.net> wrote:
>> 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