You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Anton Vinogradov (JIRA)" <ji...@apache.org> on 2018/01/25 10:21:00 UTC
[jira] [Updated] (IGNITE-6203) Valid query cannot be processed.
[ https://issues.apache.org/jira/browse/IGNITE-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anton Vinogradov updated IGNITE-6203:
-------------------------------------
Fix Version/s: 2.4
> Valid query cannot be processed.
> --------------------------------
>
> Key: IGNITE-6203
> URL: https://issues.apache.org/jira/browse/IGNITE-6203
> Project: Ignite
> Issue Type: Bug
> Affects Versions: 2.1
> Reporter: Alexei Scherbakov
> Priority: Major
>
> Query: select * from Integer where _KEY=? and false
> Exception:
> {noformat}
> Caused by: class org.apache.ignite.IgniteCheckedException: Failed to bind parameter [idx=1, obj=1, stmt=prep4: SELECT
> __Z0._KEY,
> __Z0._VAL
> FROM "default".INTEGER __Z0
> WHERE FALSE]
> at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.bindObject(IgniteH2Indexing.java:515)
> at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.bindParameters(IgniteH2Indexing.java:1048)
> at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.optimize(GridSqlQuerySplitter.java:1628)
> at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split(GridSqlQuerySplitter.java:220)
> at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1336)
> ... 18 more
> Caused by: org.h2.jdbc.JdbcSQLException: Invalid value "1" for parameter "parameterIndex" [90008-195]
> ...
> {noformat}
> {noformat}
> public void test() throws Exception {
> try {
> Ignite ignite = startGrid();
> SqlFieldsQuery qry = new SqlFieldsQuery("select * from Integer where _KEY=? and false");
> qry.setArgs(1);
> FieldsQueryCursor<List<?>> query = ignite.cache(DEFAULT_CACHE_NAME).query(qry);
> System.out.println(query.getAll());
> } finally {
> stopAllGrids();
> }
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)