db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Satheesh Bandaram (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-388) Intermittent failures when executing UPDATE trigger statements
Date Wed, 03 Aug 2005 00:17:35 GMT
    [ http://issues.apache.org/jira/browse/DERBY-388?page=comments#action_12317459 ] 

Satheesh Bandaram commented on DERBY-388:
-----------------------------------------

Merged this test case addition into 10.1 release.

Sending        java\testing\org\apache\derbyTesting\functionTests\master\triggerGeneral.out
Sending        java\testing\org\apache\derbyTesting\functionTests\tests\lang\triggerGeneral.sql
Sending        java\testing\org\apache\derbyTesting\functionTests\tests\lang\userDefMethods.java
Transmitting file data ...
Committed revision 227116.

> 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_test.patch, derby-388_v3.patch, 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