db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4419) NullPointerException with INSERT INTO ... from UNION and generated columns
Date Fri, 23 Oct 2009 06:43:59 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769106#action_12769106
] 

Knut Anders Hatlen commented on DERBY-4419:
-------------------------------------------

Stack trace:

java.lang.NullPointerException
	at org.apache.derby.impl.sql.compile.ResultColumn.columnTypeAndLengthMatch(ResultColumn.java:1003)
	at org.apache.derby.impl.sql.compile.ResultColumnList.columnTypesAndLengthsMatch(ResultColumnList.java:1686)
	at org.apache.derby.impl.sql.compile.ResultSetNode.columnTypesAndLengthsMatch(ResultSetNode.java:932)
	at org.apache.derby.impl.sql.compile.UnionNode.addNewNodes(UnionNode.java:411)
	at org.apache.derby.impl.sql.compile.UnionNode.modifyAccessPaths(UnionNode.java:361)
	at org.apache.derby.impl.sql.compile.SingleChildResultSetNode.modifyAccessPaths(SingleChildResultSetNode.java:439)
	at org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(DMLStatementNode.java:323)
	at org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(DMLStatementNode.java:302)
	at org.apache.derby.impl.sql.compile.DMLModStatementNode.optimizeStatement(DMLModStatementNode.java:1736)
	at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:381)
	at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:90)
	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:828)
	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:606)
	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:555)
	at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:329)

> NullPointerException with INSERT INTO ... from UNION and generated columns
> --------------------------------------------------------------------------
>
>                 Key: DERBY-4419
>                 URL: https://issues.apache.org/jira/browse/DERBY-4419
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.1.4, 10.4.1.3, 10.5.1.1, 10.5.3.0, 10.6.0.0
>            Reporter: Knut Anders Hatlen
>
> The following sequence of statements works on 10.2.2.0 and earlier, and raises a NullPointerException
with 10.3.1.4 and later:
> ij> create table t1(x int);
> 0 rows inserted/updated/deleted
> ij> insert into t1 values 1,2;
> 2 rows inserted/updated/deleted
> ij> create table t2(x int);
> 0 rows inserted/updated/deleted
> ij> insert into t2 values 2,3;
> 2 rows inserted/updated/deleted
> ij> create table t3(x int, y int generated always as identity);
> 0 rows inserted/updated/deleted
> ij> insert into t3(x) select * from t1 union select * from t2;
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message