Derby
  1. Derby
  2. DERBY-5779

Table functions should only accept arguments which are constant in their query block.

    Details

    • Urgency:
      Normal
    • Issue & fix info:
      Patch Available, Release Note Needed
    • Bug behavior facts:
      Deviation from standard, Wrong query result

      Description

      Derby lets you invoke a table function in the FROM list of a query, passing in arguments built out of columns in other tables in the FROM list. This syntax is illegal and the resulting queries have no meaning under the SQL Standard. See the discussion on DERBY-5554. We should forbid this syntax. Similar syntax involving correlated subqueries in the FROM list is already forbidden. Fixing this will create a backward incompatibility which requires a release note.

      1. derby-5779-01-ab-forbidReferencesInQueryBlock.diff
        8 kB
        Rick Hillegas
      2. derby-5779-02-aa-forbidReferencesToJoinedTables.diff
        5 kB
        Rick Hillegas
      3. derby-5779-03-aa-moreTests.diff
        5 kB
        Rick Hillegas
      4. derby-5779-04-aa-subqueriesInFromList.diff
        9 kB
        Rick Hillegas
      5. derby-5779-04-ab-subqueriesInFromList.diff
        18 kB
        Rick Hillegas
      6. releaseNote.html
        3 kB
        Rick Hillegas

        Issue Links

          Activity

          Rick Hillegas created issue -
          Rick Hillegas made changes -
          Field Original Value New Value
          Link This issue relates to DERBY-5554 [ DERBY-5554 ]
          Rick Hillegas made changes -
          Rick Hillegas made changes -
          Assignee Rick Hillegas [ rhillegas ]
          Rick Hillegas made changes -
          Issue & fix info Release Note Needed [ 10101 ] Patch Available,Release Note Needed [ 10102, 10101 ]
          Rick Hillegas made changes -
          Summary Table functions and vtis should only accept arguments which are constant in their query block. Table functions should only accept arguments which are constant in their query block.
          Description Derby lets you invoke a table function/vti in the FROM list of a query, passing in arguments built out of columns in other tables in the FROM list. This syntax is illegal and the resulting queries have no meaning under the SQL Standard. See the discussion on DERBY-5554. We should forbid this syntax. Similar syntax involving correlated subqueries in the FROM list is already forbidden. Fixing this will create a backward incompatibility which requires a release note. In particular, the sample usage for SYSCS_DIAG.SPACE_TABLE, given in the Reference Manual, will no longer work after fixing this bug. Changes to SPACE_TABLE are being discussed on DERBY-5554. Derby lets you invoke a table function in the FROM list of a query, passing in arguments built out of columns in other tables in the FROM list. This syntax is illegal and the resulting queries have no meaning under the SQL Standard. See the discussion on DERBY-5554. We should forbid this syntax. Similar syntax involving correlated subqueries in the FROM list is already forbidden. Fixing this will create a backward incompatibility which requires a release note.
          Rick Hillegas made changes -
          Attachment releaseNote.html [ 12532931 ]
          Rick Hillegas made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 10.10.0.0 [ 12321550 ]
          Resolution Fixed [ 1 ]
          Rick Hillegas made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Rick Hillegas made changes -
          Rick Hillegas made changes -
          Attachment derby-5779-03-aa-moreTests.diff [ 12536254 ]
          Rick Hillegas made changes -
          Rick Hillegas made changes -
          Rick Hillegas made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Rick Hillegas made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Mike Matrigali made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Mike Matrigali made changes -
          Labels derby_backport_reject_10_9
          Mike Matrigali made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Gavin made changes -
          Workflow jira [ 12669119 ] Default workflow, editable Closed status [ 12802653 ]
          Knut Anders Hatlen made changes -
          Link This issue is related to DERBY-6593 [ DERBY-6593 ]

            People

            • Assignee:
              Rick Hillegas
              Reporter:
              Rick Hillegas
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development