Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6724

NPE if insert statement needs recompilation after having fired a trigger

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.3.1.4, 10.4.1.3, 10.5.1.1, 10.6.1.0, 10.7.1.1, 10.8.1.2, 10.9.1.0, 10.10.1.1, 10.11.1.1
    • 10.11.1.3, 10.12.1.1
    • SQL
    • None
    • Repro attached
    • Regression

    Description

      If an insert statement that has fired a trigger, is needs recompilation during execution, it fails with a NullPointerException in InternalTriggerExecutionContext.cleanup():

      java.lang.NullPointerException
      	at org.apache.derby.impl.sql.execute.InternalTriggerExecutionContext.cleanup(InternalTriggerExecutionContext.java:236)
      	at org.apache.derby.impl.sql.execute.TriggerEventActivator.cleanup(TriggerEventActivator.java:291)
      	at org.apache.derby.impl.sql.execute.InsertResultSet.cleanUp(InsertResultSet.java:2199)
      	at org.apache.derby.impl.sql.conn.GenericStatementContext.cleanupOnError(GenericStatementContext.java:543)
      	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:476)
      	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:349)
      	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1337)
      	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1709)
      	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(EmbedPreparedStatement.java:1394)
      

      Attachments

        1. Derby6724.java
          0.9 kB
          Knut Anders Hatlen
        2. check-null.diff
          1 kB
          Knut Anders Hatlen
        3. d6724-1a.diff
          4 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              knutanders Knut Anders Hatlen
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: