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

ERROR 54038: "Maximum depth of nested triggers was exceeded" occurs when trigger fires after upating 10.1.2.5 jars to 10.1.3.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Invalid
    • 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1
    • 10.2.1.6
    • SQL
    • None
    • Urgent

    Description

      trigger fails after upgrading Cloudscape version 10.1.3.1
      10.1 repro with the embedded driver.

      Execute the following in ij with version 10.1.2.5 - (409283)
      CREATE TABLE "TEST" (

      "TESTID" INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START
      WITH 1,
      INCREMENT BY 1),

      "INFO" INTEGER NOT NULL,

      "TIMESTAMP" TIMESTAMP NOT NULL DEFAULT
      '1980-01-01-00.00.00.000000'
      );

      CREATE TRIGGER UPDATE_TEST
      AFTER UPDATE ON TEST
      REFERENCING OLD AS OLD
      FOR EACH ROW MODE DB2SQL
      UPDATE TEST SET TIMESTAMP = CURRENT_TIMESTAMP WHERE
      TESTID = OLD.TESTID;

      INSERT INTO TEST (INFO) VALUES
      (1),
      (2),
      (3);

      Exit ij

      Replace derby jars with version 10.1.3.2.424154

      Execute the following in ij:

      UPDATE TEST SET INFO = 1 WHERE TESTID = 2;
      ERROR 54038: Maximum depth of nested triggers was exceeded.

      Rajesh confirmed.
      I tried different combinations and found that the issue exists between versions and is present in older versions dating back to 10.0.
      10.0.2.2 - (349072) database -> booted in 10.1.1.0 - (208786) jars
      10.1.1.0 - (208786) database -> booted in 10.1.2.4 - (394241) jars
      10.1.2.4 - (394241) database -> booted in 10.1.2.5 - (413784) jars
      10.1.2.5 - (413784) database -> booted in 10.1.3.1 - (417277) jars (Attached is a derby.log that shows the stack trace using sane jars.)

      This (self) trigger works fine if it was created and used in the same version of jars.

      Below is the trace:
      at
      org.apache.derby.iapi.error.StandardException.newException(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.
      pushT
      riggerExecutionContext(Unknown Source)
      at
      org.apache.derby.impl.sql.execute.InternalTriggerExecutionContex
      t.<in
      it>(Unknown Source)
      at
      org.apache.derby.impl.sql.execute.GenericExecutionFactory.getTri
      ggerE
      xecutionContext(Unknown Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.<init
      >(Unknow
      n Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireBeforeTrig
      gers(
      Unknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.sql.execute.GenericTriggerExecutor.execute
      SPS(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger
      (Unkn
      own Source)
      at
      org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEv
      ent(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTrigg
      ers(U
      nknown Source)
      at
      org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
      Source
      )
      at
      org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unkno
      wn So
      urce)
      at
      org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown
      Source)
      at
      org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown
      Source)
      at
      org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown
      Source)
      at
      org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown
      Source)
      at org.apache.derby.impl.tools.ij.utilMain.go(Unknown
      Source)
      at org.apache.derby.impl.tools.ij.Main.go(Unknown
      Source)
      at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown
      Source)
      at org.apache.derby.impl.tools.ij.Main14.main(Unknown
      Source)
      at org.apache.derby.tools.ij.main(Unknown Source)

      SYSINFO:
      ------------------ Java Information ------------------
      Java Version: 1.4.2
      Java Vendor: IBM Corporation
      Java home: C:\Cloudscape_10.1\ibm-jre-n142p\jre
      Java classpath:
      C:\Cloudscape_10.1\lib\derby.jar;C:\Cloudscape_10.1\lib\derbytools.jar;C:\Cloudscape_10.1\lib\db2jcc_license_c.jar;
      OS name: Windows 2000
      OS architecture: x86
      OS version: 5.0
      Java user home: C:\Documents and Settings\Administrator
      Java user dir: C:\Documents and Settings\Administrator
      java.specification.name: Java Platform API Specification
      java.specification.version: 1.4
      --------- Derby Information --------
      JRE - JDBC: J2SE 1.4.2 - JDBC 3.0
      [C:\Cloudscape_10.1\lib\derby.jar] 10.1.3.2 - (424154)
      [C:\Cloudscape_10.1\lib\derbytools.jar] 10.1.3.2 - (424154)
      ------------------------------------------------------
      ----------------- Locale Information -----------------
      ------------------------------------------------------

      Attachments

        1. derby.log
          12 kB
          Katherine Marsden

        Issue Links

          Activity

            People

              yipng Yip Ng
              kmarsden Katherine Marsden
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: