Derby
  1. Derby
  2. DERBY-5954

NPE in SELECT involving subselects and windows functions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.6.1.0, 10.6.2.1, 10.7.1.1, 10.8.1.2, 10.8.2.2, 10.9.1.0
    • Fix Version/s: 10.8.3.3, 10.9.2.2, 10.10.1.1
    • Component/s: SQL
    • Labels:
      None
    • Urgency:
      Normal
    • Issue & fix info:
      Repro attached
    • Bug behavior facts:
      Regression, Seen in production

      Description

      A user reports and I have verified an NPE on the following SELECT:

      connect 'jdbc:derby:memory:db;create=true';

      create table blah ( a int );
      insert into blah values (1), (2), (3), (4), (5), (6), (7);

      SELECT rn, (SELECT rn FROM (SELECT row_number() over() rn FROM blah ) as T2
      where T2.rn = T1.rn+1) rn2
      FROM (SELECT row_number() over() rn from blah) as T1;

      1. derby-5954.diff
        0.6 kB
        Dag H. Wanvik
      2. derby-5954-with-test.stat
        0.2 kB
        Dag H. Wanvik
      3. derby-5954-with-test.diff
        2 kB
        Dag H. Wanvik
      4. derby-5954-with-test-2.diff
        2 kB
        Dag H. Wanvik
      5. derby-5954-with-test-2.stat
        0.2 kB
        Dag H. Wanvik

        Issue Links

          Activity

          Rick Hillegas created issue -
          Dag H. Wanvik made changes -
          Field Original Value New Value
          Attachment derby-5954.diff [ 12549982 ]
          Dag H. Wanvik made changes -
          Bug behavior facts Seen in production [ 10421 ] Regression,Seen in production [ 10420, 10421 ]
          Assignee Dag H. Wanvik [ dagw ]
          Affects Version/s 10.9.1.0 [ 12316344 ]
          Affects Version/s 10.8.2.2 [ 12317968 ]
          Affects Version/s 10.8.1.2 [ 12316362 ]
          Affects Version/s 10.7.1.1 [ 12315564 ]
          Affects Version/s 10.6.2.1 [ 12315343 ]
          Affects Version/s 10.6.1.0 [ 12313727 ]
          Affects Version/s 10.10.0.0 [ 12321550 ]
          Issue & fix info Repro attached [ 10424 ] Patch Available,Repro attached [ 10102, 10424 ]
          Dag H. Wanvik made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Dag H. Wanvik made changes -
          Link This issue relates to DERBY-5957 [ DERBY-5957 ]
          Dag H. Wanvik made changes -
          Attachment derby-5954-with-test.stat [ 12549992 ]
          Attachment derby-5954-with-test.diff [ 12549993 ]
          Dag H. Wanvik made changes -
          Attachment derby-5954-with-test-2.diff [ 12552315 ]
          Attachment derby-5954-with-test-2.stat [ 12552316 ]
          Dag H. Wanvik made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Issue & fix info Patch Available,Repro attached [ 10102, 10424 ] Repro attached [ 10424 ]
          Fix Version/s 10.10.0.0 [ 12321550 ]
          Resolution Fixed [ 1 ]
          Rick Hillegas made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Dag H. Wanvik made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Dag H. Wanvik made changes -
          Fix Version/s 10.9.1.1 [ 12321551 ]
          Fix Version/s 10.8.3.1 [ 12323475 ]
          Dag H. Wanvik made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Dag H. Wanvik made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Kathey Marsden made changes -
          Fix Version/s 10.9.2.0 [ 12323562 ]
          Fix Version/s 10.9.1.1 [ 12321551 ]
          Gavin made changes -
          Workflow jira [ 12730141 ] Default workflow, editable Closed status [ 12802055 ]

            People

            • Assignee:
              Dag H. Wanvik
              Reporter:
              Rick Hillegas
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development