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 "Fernanda Pizzorno (JIRA)" <de...@db.apache.org> on 2006/05/31 15:42:31 UTC

[jira] Updated: (DERBY-1356) Positioned update/delete when positioned after last or before first causes NullPointerException

     [ http://issues.apache.org/jira/browse/DERBY-1356?page=all ]

Fernanda Pizzorno updated DERBY-1356:
-------------------------------------

    Attachment: derby-1356.diff
                derby-1356.stat

The attached file derby-1356.diff contains a fix for this problem and a new test. I have successfully run derbyall with this patch. Can someone please review it?

Thank you in advance!

> Positioned update/delete when positioned after last or before first causes NullPointerException
> -----------------------------------------------------------------------------------------------
>
>          Key: DERBY-1356
>          URL: http://issues.apache.org/jira/browse/DERBY-1356
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Fernanda Pizzorno
>     Assignee: Fernanda Pizzorno
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: derby-1356.diff, derby-1356.stat
>
> ij version 10.2
> ij> connect 'jdbc:derby:SURTest;create=true';
> ij> autocommit off;
> ij> create table t1 (c1 int primary key, c2 int);
> 0 rows inserted/updated/deleted
> ij> insert into t1 values (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10);
> 10 rows inserted/updated/deleted
> ij> get scroll insensitive cursor sc1 as 'SELECT * FROM t1 FOR UPDATE';
> ij> after last sc1;
> No current row
> ij> update t1 set c2 = c1 + 20 where current of sc1;
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> ij> before first sc1;
> No current row
> ij> update t1 set c2 = c1 + 20 where current of sc1;
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> ij> after last sc1;
> No current row
> ij> delete from t1 where current of sc1;
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> ij> before first sc1;
> No current row
> ij> delete from t1 where current of sc1;
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> ij> close sc1;

-- 
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