db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A B (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-388) Intermittent failures when executing UPDATE trigger statements
Date Thu, 23 Jun 2005 16:44:22 GMT
    [ http://issues.apache.org/jira/browse/DERBY-388?page=comments#action_12314334 ] 

A B commented on DERBY-388:
---------------------------

Oh, I should mention that the patch I created is against the 10.0 branch.  I think we'll want
it to be applied to all branches (10.0, 10.1, and trunk) but I don't know if there's a certain
order that's supposed to be done.  So I created the patch w.r.t the 10.0 branch and have marked
the "Fixin" as 10.0.2.2".  I'll work on adding the repro for this problem to one of the existing
tests and will submit another patch for that later.

> Intermittent failures when executing UPDATE trigger statements
> --------------------------------------------------------------
>
>          Key: DERBY-388
>          URL: http://issues.apache.org/jira/browse/DERBY-388
>      Project: Derby
>         Type: Bug
>     Versions: 10.0.2.1, 10.0.2.0, 10.1.1.0
>     Reporter: A B
>     Assignee: A B
>      Fix For: 10.0.2.2
>  Attachments: derby-388.patch, derby-388.stat, go.java
>
> If I define an UPDATE trigger and then I repeatedly perform a table update that fires
the trigger over many rows, I occasionally see intermittent failures of two kinds: 1) a null
pointer exception, and/or 2) a syntax error.
> The NPE stack trace is this:
> java.lang.NullPointerException
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.makeValid(GenericPreparedStatement.java:808)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.rePrepare(GenericPreparedStatement.java:229)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:342)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(GenericTriggerExecutor.java:166)
> 	at org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger(RowTriggerExecutor.java:108)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(TriggerEventActivator.java:296)
> 	at org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTriggers(UpdateResultSet.java:824)
> 	at org.apache.derby.impl.sql.execute.UpdateResultSet.open(UpdateResultSet.java:292)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:366)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1100)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1271)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(EmbedPreparedStatement.java:259)
> The syntax error stack trace is this:
> ERROR 42X01: Syntax error: org.apache.derby.iapi.db.Factory::getTriggerExecutionContext.
> 	at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:311)
> 	at org.apache.derby.impl.sql.compile.MethodCallNode.resolveMethodCall(MethodCallNode.java:666)
> 	at org.apache.derby.impl.sql.compile.StaticMethodCallNode.bindExpression(StaticMethodCallNode.java:455)
> 	at org.apache.derby.impl.sql.compile.NonStaticMethodCallNode.bindExpression(NonStaticMethodCallNode.java:170)
> 	at org.apache.derby.impl.sql.compile.NonStaticMethodCallNode.bindExpression(NonStaticMethodCallNode.java:170)
> 	at org.apache.derby.impl.sql.compile.JavaToSQLValueNode.bindExpression(JavaToSQLValueNode.java:250)
> 	at org.apache.derby.impl.sql.compile.CastNode.bindExpression(CastNode.java:224)
> 	at
> [snip]
> org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(DMLStatementNode.java:247)
> 	at org.apache.derby.impl.sql.compile.UpdateNode.bind(UpdateNode.java:507)
> 	at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:332)
> 	at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:107)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.makeValid(GenericPreparedStatement.java:811)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.rePrepare(GenericPreparedStatement.java:229)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:342)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(GenericTriggerExecutor.java:166)
> 	at org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger(RowTriggerExecutor.java:108)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(TriggerEventActivator.java:296)
> 	at org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTriggers(UpdateResultSet.java:824)
> 	at org.apache.derby.impl.sql.execute.UpdateResultSet.open(UpdateResultSet.java:292)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:366)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1100)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1271)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(EmbedPreparedStatement.java:259)
> In both cases, it looks like the error happens when Derby decides (internally) to recompile
the trigger-action statement in the middle of trigger processing--depending on the state of
the underlying Statement object that performs the trigger action, the result will be an NPE
or a syntax error.
> I'm working on writing up a simplified reproduction and will post soon...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message