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

Parameters ? with OFFSET and/or FETCH

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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.5.1.1
    • Fix Version/s: 10.6.1.0
    • Component/s: SQL
    • Labels:
      None
    • Issue & fix info:
      High Value Fix
    • Bug behavior facts:
      Performance, Security

      Description

      The new OFFSET/FETCH syntax does not support Parameters.

      From ij against the toursdb I would like to do the following:

      ij> prepare foo as 'select * from cities offset ? rows fetch first 10 rows only';

      but results in the following syntax error:

      ERROR 42X01: Syntax error: Encountered "?" at line 1, column 29.

      Parameterized OFFSET/FETCH is important for performance (can be prepared) and security (SQL strings not created on the fly).

        Attachments

        1. derby4208a.diff
          24 kB
          Dag H. Wanvik
        2. derby4208a.stat
          0.7 kB
          Dag H. Wanvik
        3. derby4208b.diff
          26 kB
          Dag H. Wanvik
        4. derby4208b.stat
          0.7 kB
          Dag H. Wanvik
        5. derby4208c.diff
          25 kB
          Dag H. Wanvik
        6. derby4208c.stat
          0.7 kB
          Dag H. Wanvik
        7. derby4208-docs-a.diff
          2 kB
          Dag H. Wanvik
        8. derby4208-docs-b.diff
          2 kB
          Dag H. Wanvik

        Issue Links

          Activity

            People

            • Assignee:
              dagw Dag H. Wanvik
              Reporter:
              sradman Steve Radman

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment