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

Positioned update/delete when positioned after last or before first causes NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.2.1.6
    • 10.2.1.6
    • JDBC
    • None

    Description

      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;

      Attachments

        1. derby-1356.diff
          18 kB
          Fernanda Pizzorno
        2. derby-1356.stat
          0.7 kB
          Fernanda Pizzorno

        Activity

          People

            fernanda Fernanda Pizzorno
            fernanda Fernanda Pizzorno
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: