Derby
  1. Derby
  2. DERBY-4208

Parameters ? with OFFSET and/or FETCH

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major 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).

      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

          No work has yet been logged on this issue.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development