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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.3.1.4, 10.4.1.3, 10.5.1.1, 10.5.3.0, 10.6.1.0
    • 10.5.3.1, 10.6.1.0
    • SQL
    • None
    • Repro attached
    • 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'.

      Attachments

        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

            People

              bryanpendleton Bryan Pendleton
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: