You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Martin Keller (JIRA)" <ji...@apache.org> on 2010/03/16 14:41:27 UTC

[jira] Created: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

IndexChanger.doDelete throws NullPointerException
-------------------------------------------------

                 Key: DERBY-4585
                 URL: https://issues.apache.org/jira/browse/DERBY-4585
             Project: Derby
          Issue Type: Bug
    Affects Versions: 10.5.3.0
         Environment: Various operating systems, Java 1.6.0_18
            Reporter: Martin Keller


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.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12851009#action_12851009 ] 

Knut Anders Hatlen commented on DERBY-4585:
-------------------------------------------

The repro started failing when DERBY-3301 was fixed.

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>             Fix For: 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.0.0
>
>         Attachments: derby-4585.tar.gz, repro.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12850107#action_12850107 ] 

Knut Anders Hatlen commented on DERBY-4585:
-------------------------------------------

I also see the NullPointerException when I try to run the DELETE statement with head of trunk. I ran the database consistency checker (http://wiki.apache.org/db-derby/DatabaseConsistencyCheck) but that didn't reveal any structural problems in the database.

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>         Attachments: derby-4585.tar.gz
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Martin Keller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849272#action_12849272 ] 

Martin Keller commented on DERBY-4585:
--------------------------------------

Hi,

Rebooting the database doesn't change anything.
Corrupt means, that the statement above worked for several times until the first exception and then never again.

I'll attach the "corrupt" database to the issue.


> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen resolved DERBY-4585.
---------------------------------------

          Resolution: Fixed
    Issue & fix info: [Repro attached]  (was: [Repro attached, Patch Available])

Committed revision 931076.

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.6.0.0, 10.5.3.0, 10.5.2.0, 10.5.1.1, 10.4.2.0, 10.4.1.3, 10.3.3.0
>
>         Attachments: derby-4585-1a.diff, derby-4585.tar.gz, fix.diff, repro.sql, repro.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-4585:
--------------------------------------

    Attachment: derby-4585-1a.diff

Attaching a new patch which includes a regression test case. All the regression tests ran cleanly with this patch.

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.0.0
>
>         Attachments: derby-4585-1a.diff, derby-4585.tar.gz, fix.diff, repro.sql, repro.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-4585:
--------------------------------------

    Attachment: repro.zip

The attached zip file (repro.zip) contains scripts that reproduce the NullPointerException on a fresh database. While trimming the data set, the statistics changed and so did the execution plan, so I needed to add an optimizer override in order to force the optimizer to pick a plan that failed. To reproduce, unzip the attached file and run the following command in the directory where it was unzipped:

$ java -jar /path/to/derbyrun.jar ij repro.sql
ij version 10.6
.
.
.
ij> delete from t4 where d in
  (select id from t2 --derby-properties constraint=fk_t2_t1
    where b in (select t1.id from t1, t3 where t1.a=t3.id and t3.c='93A720B90BB6C25703701E67D0DA75220B7D2FFC'));
ERROR XJ001: Java exception: ': java.lang.NullPointerException'.

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>         Attachments: derby-4585.tar.gz, repro.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen reassigned DERBY-4585:
-----------------------------------------

    Assignee: Knut Anders Hatlen

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.0.0
>
>         Attachments: derby-4585.tar.gz, repro.sql, repro.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-4585:
--------------------------------------

    Attachment: fix.diff

The problem seems to be related to the caching of updatable index scans in the activation (the NPE happens because the cached scan is null). The field that holds the cached scan is initialized by TableScanResultSet.openCore() if, and only if, the scan is updatable and uses an index. However, TableScanResultSet.close() unconditionally clears the information. So if a statement execution plan has one updatable index scan and one non-updatable scan, closing the non-updatable scan may clear information needed by the still open updatable scan.

The attached patch ensures that TableScanResultSet.close() only clears index scan information from the activation if it had cached information there itself. This made the NPE go away. The patch does not include any tests, and I have not run any of the regression tests with it yet.

(By the way, I don't think this problem was introduced with DERBY-3301, but it probably made the optimizer pick a different plan (it changed how nested IN/EXISTS queries where flattened, I think) that made the problem surface. It may be possible to come up with a case that fails before DERBY-3301 too.)

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.0.0
>
>         Attachments: derby-4585.tar.gz, fix.diff, repro.sql, repro.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-4585:
--------------------------------------

    Issue & fix info: [Patch Available, Repro attached]  (was: [Repro attached])

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.0.0
>
>         Attachments: derby-4585-1a.diff, derby-4585.tar.gz, fix.diff, repro.sql, repro.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-4585:
--------------------------------------

    Attachment: repro.sql

Attaching a new, simplified repro that consists of a single stand-alone SQL script.

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>             Fix For: 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.0.0
>
>         Attachments: derby-4585.tar.gz, repro.sql, repro.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-4585:
--------------------------------------

    Issue & fix info: [Repro attached]

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>             Fix For: 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.0.0
>
>         Attachments: derby-4585.tar.gz, repro.sql, repro.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-4585:
--------------------------------------

        Fix Version/s:     (was: 10.4.1.3)
                           (was: 10.3.3.0)
                           (was: 10.4.2.0)
                           (was: 10.5.1.1)
                           (was: 10.5.2.0)
                           (was: 10.5.3.0)
    Affects Version/s: 10.5.2.0
                       10.5.1.1
                       10.4.2.0
                       10.4.1.3
                       10.3.3.0

Looks like the fix-version field was updated instead of the affects-version field. Updating fix-version and affects-version to reflect the version on which the problem has been seen and when it was fixed.

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.6.1.0
>
>         Attachments: derby-4585-1a.diff, derby-4585.tar.gz, fix.diff, repro.sql, repro.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849239#action_12849239 ] 

Rick Hillegas commented on DERBY-4585:
--------------------------------------

Hi Martin,

Thanks for logging this issue. Can you answer Knut's last question: Do you still see problems after rebooting the database? Thanks.

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845927#action_12845927 ] 

Knut Anders Hatlen commented on DERBY-4585:
-------------------------------------------

Hi Martin,

Could you please also post the DDL statements used to create the tables involved in the query (including any tables with foreign key constraints referencing LCAPPCHILDCONTROLTITLE)?

When you say that the database seems to be corrupt, which symptoms do you see? Do you also see those problems after rebooting the database?

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4585) IndexChanger.doDelete throws NullPointerException

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-4585:
--------------------------------------

           Component/s: SQL
         Fix 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
                        10.6.0.0
    Bug behavior facts: [Regression]  (was: [Data corruption])

The NPE is reproducible on 10.3.3.0 and on all 10.4 and 10.5 releases. I don't see it on 10.3.2.1 or earlier releases, so I'm flagging it as a regression. I've removed the data corruption flag, since all the data appears to be intact in the database.

> IndexChanger.doDelete throws NullPointerException
> -------------------------------------------------
>
>                 Key: DERBY-4585
>                 URL: https://issues.apache.org/jira/browse/DERBY-4585
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.3.0
>         Environment: Various operating systems, Java 1.6.0_18
>            Reporter: Martin Keller
>             Fix For: 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.0.0
>
>         Attachments: derby-4585.tar.gz, repro.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.