Derby
  1. Derby
  2. DERBY-4380

Subqueries not allowed in ON clause

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.5.3.0
    • Fix Version/s: 10.6.1.0
    • Component/s: SQL
    • Labels:
      None
    • Issue & fix info:
      Release Note Needed, Repro attached

      Description

      SOME is not allowed in ON-clause:

      ij> create table t1 (i integer);
      0 rows inserted/updated/deleted
      ij> create table t2 (i integer);
      0 rows inserted/updated/deleted
      ij> create table t3 (i integer);
      0 rows inserted/updated/deleted
      ij> insert into t1 values (1);
      1 row inserted/updated/deleted
      ij> insert into t2 values (2);
      1 row inserted/updated/deleted
      ij> insert into t3 values 2,3,4;
      3 rows inserted/updated/deleted
      ij> select * from t1 where t1.i = some (select i from t3);
      I
      -----------

      0 rows selected
      ij> select * from t1 inner join t2 on t1.i = some (select i from t3);
      ERROR 42972: An ON clause associated with a JOIN operator is not valid.
      ij>

      1. remove_translations.diff
        14 kB
        Knut Anders Hatlen
      2. releaseNote.html
        5 kB
        Knut Anders Hatlen
      3. on_subquery.diff
        17 kB
        Knut Anders Hatlen
      4. on_subquery_v2.stat
        0.9 kB
        Knut Anders Hatlen
      5. on_subquery_v2.diff
        30 kB
        Knut Anders Hatlen

        Activity

        Bernt M. Johnsen created issue -
        Knut Anders Hatlen made changes -
        Field Original Value New Value
        Attachment on_subquery.diff [ 12420178 ]
        Mike Matrigali made changes -
        Component/s SQL [ 11408 ]
        Component/s Store [ 11412 ]
        Mike Matrigali made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Knut Anders Hatlen made changes -
        Assignee Knut Anders Hatlen [ knutanders ]
        Knut Anders Hatlen made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Knut Anders Hatlen made changes -
        Summary SOME not allowed in ON clause Subqueries not allowed in ON clause
        Knut Anders Hatlen made changes -
        Attachment on_subquery_v2.stat [ 12425238 ]
        Attachment on_subquery_v2.diff [ 12425239 ]
        Knut Anders Hatlen made changes -
        Issue & fix info [Repro attached] [Patch Available, Repro attached]
        Knut Anders Hatlen made changes -
        Fix Version/s 10.6.0.0 [ 12313727 ]
        Affects Version/s 10.5.3.0 [ 12314117 ]
        Issue & fix info [Repro attached, Patch Available] [Release Note Needed, Repro attached]
        Knut Anders Hatlen made changes -
        Attachment remove_translations.diff [ 12427896 ]
        Knut Anders Hatlen made changes -
        Attachment releaseNote.html [ 12434514 ]
        Knut Anders Hatlen made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gavin made changes -
        Workflow jira [ 12477334 ] Default workflow, editable Closed status [ 12802857 ]

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Bernt M. Johnsen
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development