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

NullPointerException with INSERT INTO ... from EXCEPT/INTERSECT

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.1.0, 10.2.1.6, 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

    Description

      The sequence of statements below give a NullPointerException. The statements are very similar to the ones in DERBY-4419, but this is a separate bug since the stack traces are different, and this bug can be seen all the way back to 10.1.1.0, whereas DERBY-4419 was a regression in 10.3. (On 10.0.2.1, a syntax error is raised instead of the NPE.)

      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 except select * from t2;
      ERROR XJ001: Java exception: ': java.lang.NullPointerException'.

      Same error if INTERSECT is used instead of EXCEPT.

      Attachments

        1. d4420-1a.diff
          17 kB
          Knut Anders Hatlen
        2. d4420-1a.stat
          0.2 kB
          Knut Anders Hatlen
        3. npe.sql
          0.3 kB
          Knut Anders Hatlen

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment