Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-698

DB2 - SQL Parameterization issue on FETCH FIRST ? clause

XMLWordPrintable

      When trying to pre-load a cache from a jdbc db2 store, infinispan takes the maxEntries parameter of the eviction config to limit the number of rows fetched from the db.

      SELECT DATA_COLUMN, ID_COLUMN FROM MY_LUCENE_IDX_luceneIndex FETCH FIRST ? ROWS ONLY

      Unfortunatelly db2 seems to not accept SQL parameterization for the FETCH FIRST x CLAUSE

      java.sql.SQLException: [SQL0104] Token ? was not valid. Valid tokens: ROW ROWS. Cause . . . . . :
      A syntax error was detected at token ?. Token ? is not a valid token.
      A partial list of valid tokens is ROW ROWS.

            trustin_jira Trustin Lee (Inactive)
            garcimouche Franck Garcia (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: