db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: [jira] Updated: (DERBY-388) Intermittent failures when executing UPDATE trigger statements
Date Fri, 24 Jun 2005 18:13:41 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Committed this patch to 10.0 branch. Hope you have interest to port
this to trunk as well, at a later time... <span class="moz-smiley-s1"><span>
:-) </span></span><br>
<br>
This brings up another question on when a bug can be RESOLVED or
CLOSED.... How does JIRA track changes to multiple branches? Do we mark
each branch a fix was ported to?<br>
<br>
Sending       
java\engine\org\apache\derby\impl\sql\GenericPreparedStatement.java<br>
Transmitting file data .<br>
Committed revision 201659.<br>
<br>
Satheesh<br>
<br>
A B (JIRA) wrote:<br>
<blockquote
 cite="mid35604423.1119634017794.JavaMail.jira@ajax.apache.org"
 type="cite">
  <pre wrap="">     [ <a class="moz-txt-link-freetext" href="http://issues.apache.org/jira/browse/DERBY-388?page=all">http://issues.apache.org/jira/browse/DERBY-388?page=all</a>
]

A B updated DERBY-388:
----------------------

    Attachment: derby-388_v3.patch

Attaching a new patch (this is the 3rd version).  Patch is against the 10.0 codeline and I'm
hoping it can be applied to that branch (that's where my " itch" is).  Ran "derbyall" on Windows
2000  with IBM jdk 1.4.2 with no new failures. 

  </pre>
  <blockquote type="cite">
    <pre wrap="">Intermittent failures when executing UPDATE trigger statements
--------------------------------------------------------------

         Key: DERBY-388
         URL: <a class="moz-txt-link-freetext" href="http://issues.apache.org/jira/browse/DERBY-388">http://issues.apache.org/jira/browse/DERBY-388</a>
     Project: Derby
        Type: Bug
    Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0
    Reporter: A B
    Assignee: A B
     Fix For: 10.0.2.2
 Attachments: 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...
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>


Mime
View raw message