Derby
  1. Derby
  2. DERBY-4419

NullPointerException with INSERT INTO ... from UNION and identity columns

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.3.1.4, 10.4.1.3, 10.5.1.1, 10.5.3.0, 10.6.1.0
    • Fix Version/s: 10.5.3.1, 10.6.1.0
    • Component/s: SQL
    • Labels:
      None
    • Issue & fix info:
      Repro attached
    • Bug behavior facts:
      Regression

      Description

      The following sequence of statements works on 10.2.2.0 and earlier, and raises a NullPointerException with 10.3.1.4 and later:

      ij> create table t1(x int);
      0 rows inserted/updated/deleted
      ij> insert into t1 values 1,2;
      2 rows inserted/updated/deleted
      ij> create table t2(x int);
      0 rows inserted/updated/deleted
      ij> insert into t2 values 2,3;
      2 rows inserted/updated/deleted
      ij> create table t3(x int, y int generated always as identity);
      0 rows inserted/updated/deleted
      ij> insert into t3 select * from t1 union select * from t2;
      ERROR XJ001: Java exception: ': java.lang.NullPointerException'.

      1. addASimpleTest.diff
        2 kB
        Bryan Pendleton
      2. npe.sql
        0.3 kB
        Knut Anders Hatlen
      3. use4425CodePatch.diff
        2 kB
        Bryan Pendleton

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Bryan Pendleton
              Reporter:
              Knut Anders Hatlen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development