Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 45775 invoked from network); 16 Nov 2005 14:51:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Nov 2005 14:51:54 -0000 Received: (qmail 21707 invoked by uid 500); 16 Nov 2005 14:51:53 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 21678 invoked by uid 500); 16 Nov 2005 14:51:53 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 21669 invoked by uid 99); 16 Nov 2005 14:51:52 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Nov 2005 06:51:50 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 7A8AF126 for ; Wed, 16 Nov 2005 15:51:29 +0100 (CET) Message-ID: <1713683603.1132152689499.JavaMail.jira@ajax.apache.org> Date: Wed, 16 Nov 2005 15:51:29 +0100 (CET) From: "Andreas Korneliussen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-707) providing RowLocation for deleted+purged row to GenericConglomerateController causes nullpointerexception In-Reply-To: <957586856.1132061128448.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-707?page=all ] Andreas Korneliussen updated DERBY-707: --------------------------------------- Attachment: (was: DERBY-707.diff) > providing RowLocation for deleted+purged row to GenericConglomerateController causes nullpointerexception > --------------------------------------------------------------------------------------------------------- > > Key: DERBY-707 > URL: http://issues.apache.org/jira/browse/DERBY-707 > Project: Derby > Type: Bug > Components: Store > Environment: Java 1.4 > Reporter: Andreas Korneliussen > Assignee: Andreas Korneliussen > Priority: Minor > > To provide scrollable updatable resultsets, we will store the RowLocation for every row in the ResultSet in a temporary table (backingstore hashtable). The RowLocation is used to reposition the cursor before an update. > The problem is when the row for the RowLocation has been deleted and purged by another transaction. The update will then fail with a NullPointerException in GenericConglomerateController.replace(..): > java.lang.NullPointerException > at org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.replace(GenericConglomerateController.java:465) > at org.apache.derby.impl.sql.execute.RowChangerImpl.updateRow(RowChangerImpl.java:516) > at org.apache.derby.impl.sql.execute.UpdateResultSet.collectAffectedRows(UpdateResultSet.java:577) > at org.apache.derby.impl.sql.execute.UpdateResultSet.open(UpdateResultSet.java:276) > at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:368) > at org.apache.derby.impl.jdbc.EmbedResultSet.updateRow(EmbedResultSet.java:3256) > It fails when checking if the row has been deleted (not purged) , because pos.current_page is null: > if (pos.current_page.isDeletedAtSlot(pos.current_slot)) > { > ret_val = false; > } > The proposed fix is to use the return value from open_conglom.latchPage(..). If it returns false, the RowLocation is invalid (deleted+purged). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira