You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2017/09/26 12:25:01 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 ]
Vladimir Ozerov updated IGNITE-6203:
------------------------------------
Fix Version/s: (was: 2.3)
> 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
>
> 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
(v6.4.14#64029)