Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 79593 invoked from network); 15 Sep 2006 23:52:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Sep 2006 23:52:51 -0000 Received: (qmail 51844 invoked by uid 500); 15 Sep 2006 23:52:50 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 51806 invoked by uid 500); 15 Sep 2006 23:52:50 -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 51797 invoked by uid 99); 15 Sep 2006 23:52:50 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of yipng168@gmail.com designates 64.233.182.191 as permitted sender) Received: from [64.233.182.191] (HELO nf-out-0910.google.com) (64.233.182.191) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Sep 2006 16:52:49 -0700 Received: by nf-out-0910.google.com with SMTP id n29so2500589nfc for ; Fri, 15 Sep 2006 16:51:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=RIPLzqNzJhYLpSvD1qbOI1zi5Fzze3u2rVtHWgdMsIkM5UT3vkf4IsmW/U7vyuLBsNCtSk1PtxjOO8DKwsoiFp9kgppKKgodWCmQxEXwqFGukisP98oRUt6A79A+jKxU2jOrxQgtuo9flBcDpqpqRpcjKJEmGVZ2k1wAUgLSUXc= Received: by 10.49.8.1 with SMTP id l1mr14006205nfi; Fri, 15 Sep 2006 16:51:27 -0700 (PDT) Received: by 10.49.7.11 with HTTP; Fri, 15 Sep 2006 16:51:27 -0700 (PDT) Message-ID: Date: Fri, 15 Sep 2006 16:51:27 -0700 From: "Yip Ng" To: derby-dev@db.apache.org Subject: Re: [jira] Commented: (DERBY-939) NullPointerException at ResultSet.close() time for simple query using UNION and INTERSECT In-Reply-To: <11098897.1158363863481.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_54815_21721166.1158364287831" References: <724490560.1139591397506.JavaMail.jira@ajax.apache.org> <11098897.1158363863481.JavaMail.jira@brutus> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_54815_21721166.1158364287831 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I don't think this issue requires a release note. On 9/15/06, Rick Hillegas (JIRA) wrote: > > [ > http://issues.apache.org/jira/browse/DERBY-939?page=comments#action_12435151] > > Rick Hillegas commented on DERBY-939: > ------------------------------------- > > Can someone please explain to me why this issue requires a release note? > Why shouldn't this issue just appear in the same list with the other 150 or > so bugs which were fixed for 10.2? > > > NullPointerException at ResultSet.close() time for simple query using > UNION and INTERSECT > > > ----------------------------------------------------------------------------------------- > > > > Key: DERBY-939 > > URL: http://issues.apache.org/jira/browse/DERBY-939 > > Project: Derby > > Issue Type: Bug > > Components: SQL > > Affects Versions: 10.2.1.0, 10.1.3.0 > > Environment: Embedded and server modes, with > derby.language.logQueryPlan=true > > Reporter: A B > > Assigned To: Yip Ng > > Priority: Minor > > Fix For: 10.2.1.0 > > > > Attachments: derby939trunkdiffpatch1.txt, > derby939trunkdiffpatch2.txt, derby939trunkstatpatch1.txt, > derby939trunkstatpatch2.txt > > > > > > If I set "derby.language.logQueryPlan" to true and then attempt to > execute the following simple query using UNION and INTERSECT, Derby will > return the correct results and then, _after_ returning the results, will > throw a NullPointerException. This error also occurs for 10.1. > > To reproduce: > > > java -Dderby.language.logQueryPlan=true org.apache.derby.tools.ij > > and then do: > > create table t1 (i int); > > create table t2 (j int); > > create table t3 (a int); > > ij> select i from t1 union (select j from t2 intersect select a from > t3); > > 1 > > ----------- > > 0 rows selected > > ERROR XJ001: Java exception: ': java.lang.NullPointerException'. > > If I add data, the query will return the correct results, but then > throw the NPE. > > insert into t1 values 1, 2, 3, 4, 5; > > insert into t2 values 2, 4, 6, 8, 10; > > insert into t3 values 2, 3, 4; > > ij> select i from t1 union (select j from t2 intersect select a from > t3); > > 1 > > ----------- > > 1 > > 2 > > 3 > > 4 > > 5 > > 5 rows selected > > ERROR XJ001: Java exception: ': java.lang.NullPointerException'. > > The embedded and client stack traces are shown below. Both suggest that > the problem occurs during the close of the result set. > > -- Embedded -- > > java.lang.NullPointerException > > at > org.apache.derby.impl.sql.execute.rts.RealUnionResultSetStatistics.getStatementExecutionPlanText > (RealUnionResultSetStatistics.java:107) > > at > org.apache.derby.impl.sql.execute.rts.RealSortStatistics.getStatementExecutionPlanText > (RealSortStatistics.java:124) > > at > org.apache.derby.impl.sql.execute.rts.RunTimeStatisticsImpl.getStatementExecutionPlanText > (RunTimeStatisticsImpl.java:293) > > at > org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.finishAndRTS( > BasicNoPutResultSetImpl.java:633) > > at org.apache.derby.impl.sql.execute.SortResultSet.finish( > SortResultSet.java:479) > > at org.apache.derby.impl.jdbc.EmbedResultSet.close( > EmbedResultSet.java:533) > > at org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults( > JDBCDisplayUtil.java:272) > > at org.apache.derby.tools.JDBCDisplayUtil.DisplayResults( > JDBCDisplayUtil.java:260) > > at org.apache.derby.impl.tools.ij.utilMain.displayResult( > utilMain.java:381) > > at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java > :434) > > at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:310) > > at org.apache.derby.impl.tools.ij.Main.go(Main.java:203) > > at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:169) > > at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55) > > at org.apache.derby.tools.ij.main(ij.java:60) > > -- Client -- > > ERROR (no SQLState): actual code point, 4692 does not match expected > code point, 9224 > > java.sql.SQLException: actual code point, 4692 does not match expected > code point, 9224 > > at org.apache.derby.client.am.SqlException.getSQLException( > SqlException.java:280) > > at org.apache.derby.client.am.ResultSet.close(ResultSet.java > :412) > > at org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults( > JDBCDisplayUtil.java:272) > > at org.apache.derby.tools.JDBCDisplayUtil.DisplayResults( > JDBCDisplayUtil.java:260) > > at org.apache.derby.impl.tools.ij.utilMain.displayResult( > utilMain.java:381) > > at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java > :434) > > at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:310) > > at org.apache.derby.impl.tools.ij.Main.go(Main.java:203) > > at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:169) > > at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55) > > at org.apache.derby.tools.ij.main(ij.java:60) > > Caused by: org.apache.derby.client.am.DisconnectException: actual code > point, 4692 does not match ex > > pected code point, 9224 > > at org.apache.derby.client.net.Reply.zThrowSyntaxError( > Reply.java:1157) > > at > org.apache.derby.client.net.Reply.parseLengthAndMatchCodePoint(Reply.java > :1057) > > at org.apache.derby.client.net.NetConnectionReply.parseSQLCARD( > NetConnectionReply.java:2519) > > at > org.apache.derby.client.net.NetConnectionReply.parseRDBCMMreply( > NetConnectionReply.java:2 > > 00) > > at > org.apache.derby.client.net.NetConnectionReply.readLocalCommit( > NetConnectionReply.java:13 > > 3) > > at org.apache.derby.client.net.ConnectionReply.readLocalCommit( > ConnectionReply.java:42) > > at org.apache.derby.client.net.NetConnection.readLocalCommit_( > NetConnection.java:1347) > > at org.apache.derby.client.am.Connection.readCommit( > Connection.java:624) > > at org.apache.derby.client.am.Connection.readAutoCommit( > Connection.java:614) > > at > org.apache.derby.client.am.ResultSet.readAutoCommitIfNotAutoCommitted( > ResultSet.java:509) > > at org.apache.derby.client.am.ResultSet.readCloseAndAutoCommit( > ResultSet.java:474) > > at > org.apache.derby.client.am.ResultSet.flowCloseAndAutoCommitIfNotAutoCommitted > (ResultSet.j > > ava:455) > > at org.apache.derby.client.am.ResultSet.closeX(ResultSet.java > :425) > > at org.apache.derby.client.am.ResultSet.close(ResultSet.java > :407) > > ERROR XJ001: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: > java.lang.NullPointerException > > [XX] XJ001.U > > java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, > SQLERRMC: java.lang.NullPointerException[XX]XJ001.U > > at org.apache.derby.client.am.SqlException.getSQLException( > SqlException.java:280) > > at org.apache.derby.client.am.SqlException.getSQLException( > SqlException.java:295) > > at org.apache.derby.client.am.ResultSet.close(ResultSet.java > :412) > > at org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults( > JDBCDisplayUtil.java:272) > > at org.apache.derby.tools.JDBCDisplayUtil.DisplayResults( > JDBCDisplayUtil.java:260) > > at org.apache.derby.impl.tools.ij.utilMain.displayResult( > utilMain.java:381) > > at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java > :434) > > at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:310) > > at org.apache.derby.impl.tools.ij.Main.go(Main.java:203) > > at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:169) > > at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55) > > at org.apache.derby.tools.ij.main(ij.java:60) > > -- > This message is automatically generated by JIRA. > - > If you think it was sent incorrectly contact one of the administrators: > http://issues.apache.org/jira/secure/Administrators.jspa > - > For more information on JIRA, see: http://www.atlassian.com/software/jira > > > ------=_Part_54815_21721166.1158364287831 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I don't think this issue requires a release note.

On 9/15/06, Rick Hillegas (JIRA) <derby-dev@db.apache.org > wrote:
    [ http://issues.apache.org/jira/browse/DERBY-939?page=comments#action_12435151 ]

Rick Hillegas commented on DERBY-939:
-------------------------------------

Can someone please explain to me why this issue requires a release note? Why shouldn't this issue just appear in the same list with the other 150 or so bugs which were fixed for 10.2?

> NullPointerException at ResultSet.close() time for simple query using UNION and INTERSECT
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-939
>                 URL: http://issues.apache.org/jira/browse/DERBY-939
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.0, 10.1.3.0
>         Environment: Embedded and server modes, with derby.language.logQueryPlan=true
>            Reporter: A B
>         Assigned To: Yip Ng
>            Priority: Minor
>             Fix For: 10.2.1.0
>
>         Attachments: derby939trunkdiffpatch1.txt, derby939trunkdiffpatch2.txt , derby939trunkstatpatch1.txt, derby939trunkstatpatch2.txt
>
>
> If I set "derby.language.logQueryPlan" to true and then attempt to execute the following simple query using UNION and INTERSECT, Derby will return the correct results and then, _after_ returning the results, will throw a NullPointerException.  This error also occurs for 10.1.
> To reproduce:
> > java -Dderby.language.logQueryPlan=true org.apache.derby.tools.ij
> and then do:
> create table t1 (i int);
> create table t2 (j int);
> create table t3 (a int);
> ij> select i from t1 union (select j from t2 intersect select a from t3);
> 1
> -----------
> 0 rows selected
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> If I add data, the query will return the correct results,  but then throw the NPE.
> insert into t1 values 1, 2, 3, 4, 5;
> insert into t2 values 2, 4, 6, 8, 10;
> insert into t3 values 2, 3, 4;
> ij> select i from t1 union (select j from t2 intersect select a from t3);
> 1
> -----------
> 1
> 2
> 3
> 4
> 5
> 5 rows selected
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> The embedded and client stack traces are shown below. Both suggest that the problem occurs during the close of the result set.
> -- Embedded --
> java.lang.NullPointerException
>       at org.apache.derby.impl.sql.execute.rts.RealUnionResultSetStatistics.getStatementExecutionPlanText(RealUnionResultSetStatistics.java:107)
>       at org.apache.derby.impl.sql.execute.rts.RealSortStatistics.getStatementExecutionPlanText(RealSortStatistics.java:124)
>       at org.apache.derby.impl.sql.execute.rts.RunTimeStatisticsImpl.getStatementExecutionPlanText (RunTimeStatisticsImpl.java:293)
>       at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.finishAndRTS(BasicNoPutResultSetImpl.java:633)
>       at org.apache.derby.impl.sql.execute.SortResultSet.finish (SortResultSet.java:479)
>       at org.apache.derby.impl.jdbc.EmbedResultSet.close(EmbedResultSet.java:533)
>       at org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults(JDBCDisplayUtil.java:272)
>       at org.apache.derby.tools.JDBCDisplayUtil.DisplayResults(JDBCDisplayUtil.java:260)
>       at org.apache.derby.impl.tools.ij.utilMain.displayResult(utilMain.java:381)
>       at org.apache.derby.impl.tools.ij.utilMain.doCatch (utilMain.java:434)
>       at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:310)
>       at org.apache.derby.impl.tools.ij.Main.go(Main.java:203)
>       at org.apache.derby.impl.tools.ij.Main.mainCore (Main.java:169)
>       at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
>       at org.apache.derby.tools.ij.main(ij.java:60)
> -- Client --
> ERROR (no SQLState): actual code point, 4692 does not match expected code point, 9224
> java.sql.SQLException: actual code point, 4692 does not match expected code point, 9224
>         at org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:280)
>         at org.apache.derby.client.am.ResultSet.close (ResultSet.java:412)
>         at org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults(JDBCDisplayUtil.java:272)
>         at org.apache.derby.tools.JDBCDisplayUtil.DisplayResults(JDBCDisplayUtil.java:260)
>         at org.apache.derby.impl.tools.ij.utilMain.displayResult(utilMain.java:381)
>         at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:434)
>         at org.apache.derby.impl.tools.ij.utilMain.go (utilMain.java:310)
>         at org.apache.derby.impl.tools.ij.Main.go(Main.java:203)
>         at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:169)
>         at org.apache.derby.impl.tools.ij.Main14.main (Main14.java:55)
>         at org.apache.derby.tools.ij.main(ij.java:60)
> Caused by: org.apache.derby.client.am.DisconnectException: actual code point, 4692 does not match ex
> pected code point, 9224
>         at org.apache.derby.client.net.Reply.zThrowSyntaxError(Reply.java:1157)
>         at org.apache.derby.client.net.Reply.parseLengthAndMatchCodePoint(Reply.java:1057)
>         at org.apache.derby.client.net.NetConnectionReply.parseSQLCARD (NetConnectionReply.java:2519)
>         at org.apache.derby.client.net.NetConnectionReply.parseRDBCMMreply(NetConnectionReply.java:2
> 00)
>         at org.apache.derby.client.net.NetConnectionReply.readLocalCommit (NetConnectionReply.java:13
> 3)
>         at org.apache.derby.client.net.ConnectionReply.readLocalCommit(ConnectionReply.java:42)
>         at org.apache.derby.client.net.NetConnection.readLocalCommit_( NetConnection.java:1347)
>         at org.apache.derby.client.am.Connection.readCommit(Connection.java:624)
>         at org.apache.derby.client.am.Connection.readAutoCommit(Connection.java:614)
>         at org.apache.derby.client.am.ResultSet.readAutoCommitIfNotAutoCommitted(ResultSet.java:509)
>         at org.apache.derby.client.am.ResultSet.readCloseAndAutoCommit(ResultSet.java:474)
>         at org.apache.derby.client.am.ResultSet.flowCloseAndAutoCommitIfNotAutoCommitted (ResultSet.j
> ava:455)
>         at org.apache.derby.client.am.ResultSet.closeX(ResultSet.java:425)
>         at org.apache.derby.client.am.ResultSet.close(ResultSet.java:407)
> ERROR XJ001: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerException
> [XX] XJ001.U
> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerException[XX]XJ001.U
>         at org.apache.derby.client.am.SqlException.getSQLException (SqlException.java:280)
>         at org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:295)
>         at org.apache.derby.client.am.ResultSet.close(ResultSet.java:412)
>         at org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults(JDBCDisplayUtil.java:272)
>         at org.apache.derby.tools.JDBCDisplayUtil.DisplayResults(JDBCDisplayUtil.java:260)
>         at org.apache.derby.impl.tools.ij.utilMain.displayResult (utilMain.java:381)
>         at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:434)
>         at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:310)
>         at org.apache.derby.impl.tools.ij.Main.go (Main.java:203)
>         at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:169)
>         at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
>         at org.apache.derby.tools.ij.main (ij.java:60)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



------=_Part_54815_21721166.1158364287831--