Derby
  1. Derby
  2. DERBY-4585

IndexChanger.doDelete throws NullPointerException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
    • Fix Version/s: 10.5.3.2, 10.6.1.0
    • Component/s: SQL
    • Labels:
      None
    • Environment:
      Various operating systems, Java 1.6.0_18
    • Issue & fix info:
      Repro attached
    • Bug behavior facts:
      Regression

      Description

      After a bunch of DELETE and DROP-Commands, the following error occurs in our application:

      2010-03-16 12:54:23.070 GMT Thread[DRDAConnThread_4,5,derby.daemons] (XID = 15898), (SESSIONID = 1), (DATABASE = ixintrexx), (DRDAID = NF000001.PAA8-4469821361421447518

      {2}), Cleanup action starting
      2010-03-16 12:54:23.070 GMT Thread[DRDAConnThread_4,5,derby.daemons] (XID = 15898), (SESSIONID = 1), (DATABASE = ixintrexx), (DRDAID = NF000001.PAA8-4469821361421447518{2}

      ), Failed Statement is: DELETE FROM LCAPPCHILDCONTROLTITLE WHERE STRCHILDCONTROLGUID IN (SELECT STRGUID FROM LCAPPCHILDCONTROL WHERE STRAPPCONTROLDRGUID IN (SELECT A.STRGUID FROM LCAPPCONTROLDR A, LCAPPFUP B WHERE A.STRAPPFUPGUID = B.STRGUID AND B.STRAPPGUID = '93A720B90BB6C25703701E67D0DA75220B7D2FFC'))
      java.lang.NullPointerException
      at org.apache.derby.impl.sql.execute.IndexChanger.doDelete(IndexChanger.java:369)
      at org.apache.derby.impl.sql.execute.IndexChanger.delete(IndexChanger.java:544)
      at org.apache.derby.impl.sql.execute.IndexSetChanger.delete(IndexSetChanger.java:250)
      at org.apache.derby.impl.sql.execute.RowChangerImpl.deleteRow(RowChangerImpl.java:476)
      at org.apache.derby.impl.sql.execute.DeleteResultSet.collectAffectedRows(DeleteResultSet.java:405)
      at org.apache.derby.impl.sql.execute.DeleteResultSet.open(DeleteResultSet.java:137)
      at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:416)
      at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:297)
      at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1235)
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:625)
      at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(EmbedStatement.java:175)
      at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLIMM(DRDAConnThread.java:5022)
      at org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:750)
      at org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:290)
      Cleanup action completed

      The database seems to be corrupt, after this exception has been thrown.
      As you can see, I already compiled Derby to get the line number where the error occurs. I must apologize for not having a sufficient test case yet, but the code leading to this issue is very complex. If one wants to reproduce this bug, I can send a download link for our product and instructions to reproduce the problem.

      1. derby-4585.tar.gz
        1.87 MB
        Martin Keller
      2. repro.zip
        3 kB
        Knut Anders Hatlen
      3. repro.sql
        1 kB
        Knut Anders Hatlen
      4. fix.diff
        0.9 kB
        Knut Anders Hatlen
      5. derby-4585-1a.diff
        5 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Martin Keller
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development