Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 90548 invoked from network); 17 Apr 2011 03:24:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Apr 2011 03:24:23 -0000 Received: (qmail 92191 invoked by uid 500); 17 Apr 2011 03:24:23 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 92176 invoked by uid 500); 17 Apr 2011 03:24:23 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 92167 invoked by uid 99); 17 Apr 2011 03:24:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Apr 2011 03:24:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rsjay1976@gmail.com designates 209.85.210.44 as permitted sender) Received: from [209.85.210.44] (HELO mail-pz0-f44.google.com) (209.85.210.44) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Apr 2011 03:24:14 +0000 Received: by pzk30 with SMTP id 30so1999639pzk.31 for ; Sat, 16 Apr 2011 20:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=3CRU4Y6Lrnzgoxb21HTkbWe9IOyhl4H4jIlGZnYTRQc=; b=OaomI5uRZXCso82uI/l9pD34YY1g9cOaf8uoDpm59CpZtmovJxp/tAuSKT3zxxRDB7 KEPklvwUv/eN7Emi1jT1gAXOjq1xLyzTbDBEr6MGi34NzqYzrKCHmah40ZrH90EzokcF QFnGX3TaNHInOc6NJOPqn+DCfShUFpjwAkwLY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=qc9m20TkichznaFIdtLKEn2wrOg1biRjmyG8Hb+9kSwNQYAAkd243DqAU8Q6BTGESf vzvyMFXIarNTzkvyCsQPsTolWGOFkKmyqsZiI8CwBKN2/YNSIXfoiCNUh9G3b+meXQ6o 05fd1qYBYd1643SP/6lUMer4crK4KRs9mtuOI= MIME-Version: 1.0 Received: by 10.142.248.30 with SMTP id v30mr1829938wfh.196.1303010633257; Sat, 16 Apr 2011 20:23:53 -0700 (PDT) Received: by 10.142.153.4 with HTTP; Sat, 16 Apr 2011 20:23:53 -0700 (PDT) In-Reply-To: References: <1774924227.1698.1297141617690.JavaMail.tomcat@hel.zones.apache.org> <1793926939.2214.1297167477468.JavaMail.tomcat@hel.zones.apache.org> <4DA8621E.3020909@sbcglobal.net> Date: Sat, 16 Apr 2011 22:23:53 -0500 Message-ID: Subject: Re: (DERBY-5010) [patch] bad equivalence check From: Jayaram Subramanian To: derby-dev Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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 wrote: > Thanks all, > When i see the logs i am seeing that the test which calls isequivalent me= thod is > > org.apache.derbyTesting.functionTests.util.ScriptTestCase.runTest(ScriptT= estCase.java:188) > > The line 188 in scripttestcase has > org.apache.derby.tools.ij.runScript( > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0conn, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sqlIn, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0inputEncod= ing, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0getOutputStream(), > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0outputEnc, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0useSystemProperties); > > > 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 > 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.. =A0Just attaching one of >>> the example. Could you please guide me how to proceed from here >>> >>> With Regards >>> Jayaram >>> >>> java.lang.Throwable >>> =A0 =A0 =A0 =A0at java.lang.Thread.dumpStack(Thread.java:417) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.BaseColumnNode.isEquivalent(BaseColum= nNode.java:180) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SubstituteExpressionVisitor.visit(Sub= stituteExpressionVisitor.java:62) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.ja= va:718) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.ResultColumn.acceptChildren(ResultCol= umn.java:1550) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.ja= va:721) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.QueryTreeNodeVector.acceptChildren(Qu= eryTreeNodeVector.java:141) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.ja= va:721) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.ResultSetNode.acceptChildren(ResultSe= tNode.java:1611) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.FromBaseTable.acceptChildren(FromBase= Table.java:4621) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.ja= va:721) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SingleChildResultSetNode.acceptChildr= en(SingleChildResultSetNode.java:611) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.ProjectRestrictNode.acceptChildren(Pr= ojectRestrictNode.java:1843) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.ja= va:721) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SingleChildResultSetNode.acceptChildr= en(SingleChildResultSetNode.java:611) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.ProjectRestrictNode.acceptChildren(Pr= ojectRestrictNode.java:1843) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.ja= va:721) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SingleChildResultSetNode.acceptChildr= en(SingleChildResultSetNode.java:611) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.ProjectRestrictNode.acceptChildren(Pr= ojectRestrictNode.java:1843) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.ja= va:721) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SubqueryNode.acceptChildren(SubqueryN= ode.java:2300) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.ja= va:721) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.UnaryOperatorNode.acceptChildren(Unar= yOperatorNode.java:759) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.ja= va:721) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.BinaryOperatorNode.acceptChildren(Bin= aryOperatorNode.java:855) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.QueryTreeNode.accept(QueryTreeNode.ja= va:721) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.GroupByNode.addNewColumnsForAggregati= on(GroupByNode.java:566) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.GroupByNode.addAggregates(GroupByNode= .java:245) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.GroupByNode.init(GroupByNode.java:184= ) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.iapi.sql.compile.NodeFactory.getNode(NodeFactory.java:= 273) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SelectNode.genProjectRestrict(SelectN= ode.java:1483) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SelectNode.modifyAccessPaths(SelectNo= de.java:2123) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SingleChildResultSetNode.modifyAccess= Paths(SingleChildResultSetNode.java:439) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SubqueryNode.modifyAccessPaths(Subque= ryNode.java:1873) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SubqueryList.modifyAccessPaths(Subque= ryList.java:116) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SelectNode.modifyAccessPaths(SelectNo= de.java:2051) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SingleChildResultSetNode.modifyAccess= Paths(SingleChildResultSetNode.java:439) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SubqueryNode.modifyAccessPaths(Subque= ryNode.java:1873) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SubqueryList.modifyAccessPaths(Subque= ryList.java:116) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.SelectNode.modifyAccessPaths(SelectNo= de.java:2051) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(DM= LStatementNode.java:317) >>> =A0 =A0 =A0 =A0at >>> org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(CursorNo= de.java:587) >>> >>> >> Do any of the the full stack traces have a reference to the test compili= ng >> 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: =A0line number) >> e.g. >> =A0 =A0at >> org.apache.derbyTesting.functionTests.tests.lang.NullsTest.testInsert(Nu= llsTest.java:206) >> >> Then you can look at that test file and that line number and it will sho= w 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 thi= s >> code. >> >> >> Thanks >> >> Kathey >> >> >