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-6348) NPE or assert failure in recursive trigger
Date Wed, 18 Sep 2013 12:32:51 GMT

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

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

Full stack trace for the assert failure on trunk:

{noformat}
org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED Expected sqlSessionContextForChildren
to be non-null
        at org.apache.derby.shared.common.sanity.SanityManager.ASSERT(SanityManager.java:120)
        at org.apache.derby.impl.sql.execute.BaseActivation.getSQLSessionContextForChildren(BaseActivation.java:1396)
        at org.apache.derby.impl.sql.execute.BaseActivation.setupSQLSessionContextForChildren(BaseActivation.java:1419)
        at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.setupSessionContextMinion(GenericLanguageConnectionContext.java:3694)
        at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.setupSubStatementSessionContext(GenericLanguageConnectionContext.java:3764)
        at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(GenericPreparedStatement.java:306)
        at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(GenericTriggerExecutor.java:209)
        at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(StatementTriggerExecutor.java:85)
        at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(TriggerEventActivator.java:272)
        at org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTriggers(UpdateResultSet.java:739)
        at org.apache.derby.impl.sql.execute.UpdateResultSet.open(UpdateResultSet.java:279)
        at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:438)
        at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(GenericPreparedStatement.java:308)
        at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(GenericTriggerExecutor.java:209)
        at org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger(RowTriggerExecutor.java:116)
        at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(TriggerEventActivator.java:272)
        at org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTriggers(UpdateResultSet.java:739)
        at org.apache.derby.impl.sql.execute.UpdateResultSet.open(UpdateResultSet.java:279)
        at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:438)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:319)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1337)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:704)
        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:527)
        at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:369)
        at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:245)
        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)
{noformat}
                
> NPE or assert failure in recursive trigger
> ------------------------------------------
>
>                 Key: DERBY-6348
>                 URL: https://issues.apache.org/jira/browse/DERBY-6348
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.6.1.0, 10.7.1.1, 10.8.1.2, 10.9.1.0, 10.10.1.1
>            Reporter: Knut Anders Hatlen
>
> With 10.5.1.1 and newer, the following ij session fails with a NullPointerException (production
jars) or an assert failure (debug jars):
> ij version 10.10
> ij> connect 'jdbc:derby:db;create=true';
> ij> create table t(x int);
> 0 rows inserted/updated/deleted
> ij> insert into t values 0;
> 1 row inserted/updated/deleted
> ij> create trigger tr1 after update on t values 1;
> 0 rows inserted/updated/deleted
> ij> create trigger tr2 after update on t for each row update t set x = x + 1 where
x < 3;
> 0 rows inserted/updated/deleted
> ij> update t set x = x + 1;
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> It does not fail on 10.4.2.0:
> ij version 10.4
> ij> connect 'jdbc:derby:db;create=true';
> ij> create table t(x int);
> 0 rows inserted/updated/deleted
> ij> insert into t values 0;
> 1 row inserted/updated/deleted
> ij> create trigger tr1 after update on t values 1;
> 0 rows inserted/updated/deleted
> ij> create trigger tr2 after update on t for each row update t set x = x + 1 where
x < 3;
> 0 rows inserted/updated/deleted
> ij> update t set x = x + 1;
> 1 row inserted/updated/deleted
> ij> select * from t;
> X          
> -----------
> 3          
> 1 row selected

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message