Derby
  1. Derby
  2. DERBY-4712 Complex nested joins problems
  3. DERBY-4736

ASSERT FAIL when code generating a column reference in a join predicate in presence of other outer join reordering

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0
    • Fix Version/s: 10.5.3.2, 10.6.2.1, 10.7.1.1
    • Component/s: SQL
    • Labels:
      None
    • Issue & fix info:
      Repro attached

      Description

      From schema given in DERBY-4712, this query gives an ASSERT with sane Derby:

      rs = s.executeQuery("SELECT 1 FROM (T0 LEFT JOIN (T1 LEFT JOIN (T2 LEFT JOIN " +
      " (T3 LEFT JOIN T4 ON 1=1) ON T2.X = T3.X) ON 1=1) ON 1=1) " +
      " LEFT JOIN " +
      " (T5 INNER JOIN T6 ON 1=1) " +
      " ON T2.X = 1 ");

      Cf the attachments in DERBY-4712 assert-bind-opt-trees.*.
      From preliminary analysis, this error seems to be unrelated to the NPEs reported in DERBY-4712, so filing this as a sub-issue.

      1. derby-4736-1a.diff
        8 kB
        Dag H. Wanvik
      2. derby-4736-1a.stat
        0.2 kB
        Dag H. Wanvik
      3. derby-4736-1b.diff
        9 kB
        Dag H. Wanvik
      4. derby-4736-1b.stat
        0.2 kB
        Dag H. Wanvik
      5. loj-analysis.txt
        4 kB
        Dag H. Wanvik
      6. query_plan_derby_4736.pdf
        86 kB
        Nirmal Fernando
      7. derby-4736-1c.diff
        9 kB
        Dag H. Wanvik
      8. derby-4736-1c.stat
        0.2 kB
        Dag H. Wanvik
      9. derby-4736-1d.diff
        10 kB
        Dag H. Wanvik
      10. derby-4736-1d.stat
        0.2 kB
        Dag H. Wanvik
      11. derby-4736-followup-a.diff
        3 kB
        Dag H. Wanvik
      12. derby-4736-followup-a.stat
        0.2 kB
        Dag H. Wanvik

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development