You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2009/10/23 08:57:59 UTC

[jira] Commented: (DERBY-4420) NullPointerException with INSERT INTO ... from EXCEPT/INTERSECT and generated columns

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

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

Stack trace:

java.lang.NullPointerException
	at org.apache.derby.impl.sql.compile.ResultSetNode.setTableConstructorTypes(ResultSetNode.java:329)
	at org.apache.derby.impl.sql.compile.InsertNode.bindStatement(InsertNode.java:329)
	at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:324)
	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 EXCEPT/INTERSECT and generated columns
> -------------------------------------------------------------------------------------
>
>                 Key: DERBY-4420
>                 URL: https://issues.apache.org/jira/browse/DERBY-4420
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.1.1.0, 10.2.1.6, 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 sequence of statements below give a NullPointerException. The statements are very similar to the ones in DERBY-4419, but this is a separate bug since the stack traces are different, and this bug can be seen all the way back to 10.1.1.0, whereas DERBY-4419 was a regression in 10.3. (On 10.0.2.1, a syntax error is raised instead of the NPE.)
> 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 except select * from t2;
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> Same error if INTERSECT is used instead of EXCEPT.

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