From derby-dev-return-14283-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Fri Feb 10 17:12:20 2006 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 49030 invoked from network); 10 Feb 2006 17:12:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Feb 2006 17:12:20 -0000 Received: (qmail 38856 invoked by uid 500); 10 Feb 2006 17:12:19 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 38823 invoked by uid 500); 10 Feb 2006 17:12:18 -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 38814 invoked by uid 99); 10 Feb 2006 17:12:18 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2006 09:12:18 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id A1324DD for ; Fri, 10 Feb 2006 18:11:56 +0100 (CET) Message-ID: <1811997880.1139591516658.JavaMail.jira@ajax.apache.org> Date: Fri, 10 Feb 2006 18:11:56 +0100 (CET) From: "A B (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-939) NullPointerException at ResultSet.close() time for simple query using UNION and INTERSECT In-Reply-To: <724490560.1139591397506.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-939?page=3Dall ] A B updated DERBY-939: ---------------------- Description:=20 If I attempt to execute the following simple query using UNION and INTERSEC= T, Derby will return the correct results and then, _after_ returning the re= sults, will throw a NullPointerException. This error does *NOT* occur for = Derby 10.1, hence I'm marking it as "Major" since it seems like a regressio= n. To reproduce: 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 t= he 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 =09at org.apache.derby.impl.sql.execute.rts.RealUnionResultSetStatistics.ge= tStatementExecutionPlanText(RealUnionResultSetStatistics.java:107) =09at org.apache.derby.impl.sql.execute.rts.RealSortStatistics.getStatement= ExecutionPlanText(RealSortStatistics.java:124) =09at org.apache.derby.impl.sql.execute.rts.RunTimeStatisticsImpl.getStatem= entExecutionPlanText(RunTimeStatisticsImpl.java:293) =09at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.finishAndRT= S(BasicNoPutResultSetImpl.java:633) =09at org.apache.derby.impl.sql.execute.SortResultSet.finish(SortResultSet.= java:479) =09at org.apache.derby.impl.jdbc.EmbedResultSet.close(EmbedResultSet.java:5= 33) =09at org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults(JDBCDisp= layUtil.java:272) =09at org.apache.derby.tools.JDBCDisplayUtil.DisplayResults(JDBCDisplayUtil= .java:260) =09at org.apache.derby.impl.tools.ij.utilMain.displayResult(utilMain.java:3= 81) =09at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:434) =09at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:310) =09at org.apache.derby.impl.tools.ij.Main.go(Main.java:203) =09at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:169) =09at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55) =09at org.apache.derby.tools.ij.main(ij.java:60) -- Client -- We get an "actual code point does not match expected code point", but furth= er down the stack is the NPE: ERROR XJ001: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.= lang.NullPointerException =C2=B6=C2=B6XJ001.U java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLER= RMC: java.lang.NullPointerException=C2=B6=C2=B6XJ001.U at org.apache.derby.client.am.SqlException.getSQLException(SqlExcep= tion.java:280) at org.apache.derby.client.am.SqlException.getSQLException(SqlExcep= tion.java:295) at org.apache.derby.client.am.ResultSet.close(ResultSet.java:412) at org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults(JDB= CDisplayUtil.java:272) at org.apache.derby.tools.JDBCDisplayUtil.DisplayResults(JDBCDispla= yUtil.java:260) at org.apache.derby.impl.tools.ij.utilMain.displayResult(utilMain.j= ava:381) at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:43= 4) 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) was: If I attempt to execute the following simple query using UNION and INTERSEC= T, Derby will return the correct results and then, _after_ returning the re= sults, will throw a NullPointerException. This error does *NOT* occur for = Derby 10.1, hence I'm marking it as "Major" since it seems like a regressio= n. 348600 To reproduce: 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 t= he 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 =09at org.apache.derby.impl.sql.execute.rts.RealUnionResultSetStatistics.ge= tStatementExecutionPlanText(RealUnionResultSetStatistics.java:107) =09at org.apache.derby.impl.sql.execute.rts.RealSortStatistics.getStatement= ExecutionPlanText(RealSortStatistics.java:124) =09at org.apache.derby.impl.sql.execute.rts.RunTimeStatisticsImpl.getStatem= entExecutionPlanText(RunTimeStatisticsImpl.java:293) =09at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.finishAndRT= S(BasicNoPutResultSetImpl.java:633) =09at org.apache.derby.impl.sql.execute.SortResultSet.finish(SortResultSet.= java:479) =09at org.apache.derby.impl.jdbc.EmbedResultSet.close(EmbedResultSet.java:5= 33) =09at org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults(JDBCDisp= layUtil.java:272) =09at org.apache.derby.tools.JDBCDisplayUtil.DisplayResults(JDBCDisplayUtil= .java:260) =09at org.apache.derby.impl.tools.ij.utilMain.displayResult(utilMain.java:3= 81) =09at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:434) =09at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:310) =09at org.apache.derby.impl.tools.ij.Main.go(Main.java:203) =09at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:169) =09at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55) =09at org.apache.derby.tools.ij.main(ij.java:60) -- Client -- We get an "actual code point does not match expected code point", but furth= er down the stack is the NPE: ERROR XJ001: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.= lang.NullPointerException =C2=B6=C2=B6XJ001.U java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLER= RMC: java.lang.NullPointerException=C2=B6=C2=B6XJ001.U at org.apache.derby.client.am.SqlException.getSQLException(SqlExcep= tion.java:280) at org.apache.derby.client.am.SqlException.getSQLException(SqlExcep= tion.java:295) at org.apache.derby.client.am.ResultSet.close(ResultSet.java:412) at org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults(JDB= CDisplayUtil.java:272) at org.apache.derby.tools.JDBCDisplayUtil.DisplayResults(JDBCDispla= yUtil.java:260) at org.apache.derby.impl.tools.ij.utilMain.displayResult(utilMain.j= ava:381) at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:43= 4) 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) > NullPointerException at ResultSet.close() time for simple query using UNI= ON and INTERSECT > -------------------------------------------------------------------------= ---------------- > > Key: DERBY-939 > URL: http://issues.apache.org/jira/browse/DERBY-939 > Project: Derby > Type: Bug > Versions: 10.2.0.0 > Environment: Derby 10.2 trunk -- embedded and server modes > Reporter: A B > > If I attempt to execute the following simple query using UNION and INTERS= ECT, Derby will return the correct results and then, _after_ returning the = results, will throw a NullPointerException. This error does *NOT* occur fo= r Derby 10.1, hence I'm marking it as "Major" since it seems like a regress= ion. > To reproduce: > 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 t= he problem occurs during the close of the result set. > -- Embedded -- > java.lang.NullPointerException > =09at org.apache.derby.impl.sql.execute.rts.RealUnionResultSetStatistics.= getStatementExecutionPlanText(RealUnionResultSetStatistics.java:107) > =09at org.apache.derby.impl.sql.execute.rts.RealSortStatistics.getStateme= ntExecutionPlanText(RealSortStatistics.java:124) > =09at org.apache.derby.impl.sql.execute.rts.RunTimeStatisticsImpl.getStat= ementExecutionPlanText(RunTimeStatisticsImpl.java:293) > =09at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.finishAnd= RTS(BasicNoPutResultSetImpl.java:633) > =09at org.apache.derby.impl.sql.execute.SortResultSet.finish(SortResultSe= t.java:479) > =09at org.apache.derby.impl.jdbc.EmbedResultSet.close(EmbedResultSet.java= :533) > =09at org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults(JDBCDi= splayUtil.java:272) > =09at org.apache.derby.tools.JDBCDisplayUtil.DisplayResults(JDBCDisplayUt= il.java:260) > =09at org.apache.derby.impl.tools.ij.utilMain.displayResult(utilMain.java= :381) > =09at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:434) > =09at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:310) > =09at org.apache.derby.impl.tools.ij.Main.go(Main.java:203) > =09at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:169) > =09at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55) > =09at org.apache.derby.tools.ij.main(ij.java:60) > -- Client -- > We get an "actual code point does not match expected code point", but fur= ther down the stack is the NPE: > ERROR XJ001: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: jav= a.lang.NullPointerException > =C2=B6=C2=B6XJ001.U > java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQL= ERRMC: java.lang.NullPointerException=C2=B6=C2=B6XJ001.U > at org.apache.derby.client.am.SqlException.getSQLException(SqlExc= eption.java:280) > at org.apache.derby.client.am.SqlException.getSQLException(SqlExc= eption.java:295) > at org.apache.derby.client.am.ResultSet.close(ResultSet.java:412) > at org.apache.derby.tools.JDBCDisplayUtil.indent_DisplayResults(J= DBCDisplayUtil.java:272) > at org.apache.derby.tools.JDBCDisplayUtil.DisplayResults(JDBCDisp= layUtil.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) --=20 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