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] [Assigned] (DERBY-6703) MERGE statement fails with NullPointerException if ON clause references non-existent column
Date Wed, 13 Aug 2014 10:52:11 GMT

     [ https://issues.apache.org/jira/browse/DERBY-6703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen reassigned DERBY-6703:
-----------------------------------------

    Assignee: Knut Anders Hatlen

> MERGE statement fails with NullPointerException if ON clause references non-existent
column
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6703
>                 URL: https://issues.apache.org/jira/browse/DERBY-6703
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.11.1.1
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>
> {noformat}
> ij> create table t1(x int);
> 0 rows inserted/updated/deleted
> ij> create table t2(y int);
> 0 rows inserted/updated/deleted
> ij> merge into t1 using t2 on z when matched then update set x=x+1;
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> {noformat}
> Stack trace with line numbers on trunk:
> {noformat}
> java.lang.NullPointerException
> 	at org.apache.derby.impl.sql.compile.MergeNode.addColumn(MergeNode.java:947)
> 	at org.apache.derby.impl.sql.compile.MergeNode.getColumnsFromList(MergeNode.java:930)
> 	at org.apache.derby.impl.sql.compile.MergeNode.getColumnsInExpression(MergeNode.java:314)
> 	at org.apache.derby.impl.sql.compile.MergeNode.buildSelectList(MergeNode.java:816)
> 	at org.apache.derby.impl.sql.compile.MergeNode.bindLeftJoin(MergeNode.java:579)
> 	at org.apache.derby.impl.sql.compile.MergeNode.bindStatement(MergeNode.java:396)
> 	at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:401)
> 	at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:99)
> 	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1114)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:683)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:631)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:367)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:529)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:371)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:247)
> 	at org.apache.derby.impl.tools.ij.Main.go(Main.java:229)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:184)
> 	at org.apache.derby.impl.tools.ij.Main.main(Main.java:75)
> 	at org.apache.derby.tools.ij.main(ij.java:59)
> 	at org.apache.derby.iapi.tools.run.main(run.java:53)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message