Details
Description
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'.
Stack trace with line numbers on trunk:
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)