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

Parameters ? with OFFSET and/or FETCH

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.5.1.1
    • 10.6.1.0
    • SQL
    • None
    • High Value Fix
    • 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. derby4208-docs-b.diff
          2 kB
          Dag H. Wanvik
        2. derby4208-docs-a.diff
          2 kB
          Dag H. Wanvik
        3. derby4208c.stat
          0.7 kB
          Dag H. Wanvik
        4. derby4208c.diff
          25 kB
          Dag H. Wanvik
        5. derby4208b.stat
          0.7 kB
          Dag H. Wanvik
        6. derby4208b.diff
          26 kB
          Dag H. Wanvik
        7. derby4208a.stat
          0.7 kB
          Dag H. Wanvik
        8. derby4208a.diff
          24 kB
          Dag H. Wanvik

        Issue Links

          Activity

            People

              dagw Dag H. Wanvik
              sradman Steve Radman
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: