[infinispan-issues] [JBoss JIRA] Commented: (ISPN-698) DB2 - SQL Parameterization issue on FETCH FIRST ? clause
Trustin Lee (JIRA)
jira-events at lists.jboss.org
Tue Oct 12 11:15:40 EDT 2010
[ https://jira.jboss.org/browse/ISPN-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556561#action_12556561 ]
Trustin Lee commented on ISPN-698:
----------------------------------
Check this out:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/hibernate/core/trunk/core/src/main/java/org/hibernate/dialect/DB2Dialect.java?revision=20270&view=markup
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/hibernate/core/trunk/core/src/main/java/org/hibernate/dialect/DB2400Dialect.java?revision=20270&view=markup
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/hibernate/core/trunk/core/src/main/java/org/hibernate/dialect/DB2390Dialect.java?revision=20270&view=markup
DB2 390/400 dialect extends DB2Dialect and overrides supportsVariableLimit() to return false. It seems like fetch-first-clause cannot be parameterized in DB2 390 and 400. Similar improvement needs to be made in TableManipulation.
> DB2 - SQL Parameterization issue on FETCH FIRST ? clause
> --------------------------------------------------------
>
> Key: ISPN-698
> URL: https://jira.jboss.org/browse/ISPN-698
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 4.1.0.Final
> Environment: linux ubuntu 10.04 x386 32 bits
> hot spot jvm 1.6_018
> DB2/400 (jdbc jtopen v 7.1)
> Reporter: Franck Garcia
> Assignee: Manik Surtani
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list