ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Kozlov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-4287) DML: DELETE statement failed: Invalid number of query parameters. Cannot find 2 parameter.
Date Wed, 23 Nov 2016 15:02:58 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-4287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Kozlov updated IGNITE-4287:
----------------------------------
    Description: 
{code:title=test.java|borderStyle=solid}
      IgniteCache<Long, Organization> orgCache = Ignition.ignite().cache(ORG_CACHE);

        orgCache.clear();

        for (int z=100; z < 100000; z++) {
            orgCache.query(new SqlFieldsQuery("insert into Organization (_key, name) values
(?, ?)").setArgs(z, "Org 1 " + Integer.toString(z)));
        }

        for (int z=100; z < 100000; z++) {
            if (z > 0 && z % 10 == 0)
                System.out.println("Delete " + z);

            orgCache.query(new SqlFieldsQuery("delete from Organization where _key >= ?").setArgs(z));
        }
{code}

The code above failed with IgniteException
{noformat}
Exception in thread "main" javax.cache.CacheException: class org.apache.ignite.IgniteException:
Invalid number of query parameters. Cannot find 2 parameter.
	at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:761)
	at org.apache.ignite.examples.datagrid.CacheQueryExample.initialize(CacheQueryExample.java:336)
	at org.apache.ignite.examples.datagrid.CacheQueryExample.main(CacheQueryExample.java:110)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: class org.apache.ignite.IgniteException: Invalid number of query parameters. Cannot
find 2 parameter.
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:818)
	at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:749)
	... 7 more
Caused by: class org.apache.ignite.IgniteCheckedException: Invalid number of query parameters.
Cannot find 2 parameter.
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1789)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:811)
	... 8 more
Caused by: class org.apache.ignite.IgniteException: Invalid number of query parameters. Cannot
find 2 parameter.
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.findParams(GridSqlQuerySplitter.java:634)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.findParams(GridSqlQuerySplitter.java:650)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.findParams(GridSqlQuerySplitter.java:650)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.findParams(GridSqlQuerySplitter.java:604)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split(GridSqlQuerySplitter.java:403)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split(GridSqlQuerySplitter.java:184)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:1277)
	at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:226)
	at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:134)
	at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsTwoStep(DmlStatementsProcessor.java:160)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:1266)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:813)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:811)
	at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1766)
	... 9 more

{noformat}

  was:
{code:title=test.java|borderStyle=solid}
      IgniteCache<Long, Organization> orgCache = Ignition.ignite().cache(ORG_CACHE);

        orgCache.clear();

        for (int z=100; z < 100000; z++) {
            orgCache.query(new SqlFieldsQuery("insert into Organization (_key, name) values
(?, ?)").setArgs(z, "GridGain RUS " + Integer.toString(z)));
        }

        for (int z=100; z < 100000; z++) {
            if (z > 0 && z % 10 == 0)
                System.out.println("Delete " + z);

            orgCache.query(new SqlFieldsQuery("delete from Organization where _key >= ?").setArgs(z));
        }
{code}

The code above failed with IgniteException
{noformat}
Exception in thread "main" javax.cache.CacheException: class org.apache.ignite.IgniteException:
Invalid number of query parameters. Cannot find 2 parameter.
	at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:761)
	at org.apache.ignite.examples.datagrid.CacheQueryExample.initialize(CacheQueryExample.java:336)
	at org.apache.ignite.examples.datagrid.CacheQueryExample.main(CacheQueryExample.java:110)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: class org.apache.ignite.IgniteException: Invalid number of query parameters. Cannot
find 2 parameter.
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:818)
	at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:749)
	... 7 more
Caused by: class org.apache.ignite.IgniteCheckedException: Invalid number of query parameters.
Cannot find 2 parameter.
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1789)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:811)
	... 8 more
Caused by: class org.apache.ignite.IgniteException: Invalid number of query parameters. Cannot
find 2 parameter.
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.findParams(GridSqlQuerySplitter.java:634)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.findParams(GridSqlQuerySplitter.java:650)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.findParams(GridSqlQuerySplitter.java:650)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.findParams(GridSqlQuerySplitter.java:604)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split(GridSqlQuerySplitter.java:403)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split(GridSqlQuerySplitter.java:184)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:1277)
	at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:226)
	at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:134)
	at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsTwoStep(DmlStatementsProcessor.java:160)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:1266)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:813)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:811)
	at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1766)
	... 9 more

{noformat}


> DML: DELETE statement failed: Invalid number of query parameters. Cannot find 2 parameter.
> ------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-4287
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4287
>             Project: Ignite
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 1.8
>            Reporter: Sergey Kozlov
>             Fix For: 1.8
>
>
> {code:title=test.java|borderStyle=solid}
>       IgniteCache<Long, Organization> orgCache = Ignition.ignite().cache(ORG_CACHE);
>         orgCache.clear();
>         for (int z=100; z < 100000; z++) {
>             orgCache.query(new SqlFieldsQuery("insert into Organization (_key, name)
values (?, ?)").setArgs(z, "Org 1 " + Integer.toString(z)));
>         }
>         for (int z=100; z < 100000; z++) {
>             if (z > 0 && z % 10 == 0)
>                 System.out.println("Delete " + z);
>             orgCache.query(new SqlFieldsQuery("delete from Organization where _key >=
?").setArgs(z));
>         }
> {code}
> The code above failed with IgniteException
> {noformat}
> Exception in thread "main" javax.cache.CacheException: class org.apache.ignite.IgniteException:
Invalid number of query parameters. Cannot find 2 parameter.
> 	at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:761)
> 	at org.apache.ignite.examples.datagrid.CacheQueryExample.initialize(CacheQueryExample.java:336)
> 	at org.apache.ignite.examples.datagrid.CacheQueryExample.main(CacheQueryExample.java:110)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
> Caused by: class org.apache.ignite.IgniteException: Invalid number of query parameters.
Cannot find 2 parameter.
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:818)
> 	at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:749)
> 	... 7 more
> Caused by: class org.apache.ignite.IgniteCheckedException: Invalid number of query parameters.
Cannot find 2 parameter.
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1789)
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:811)
> 	... 8 more
> Caused by: class org.apache.ignite.IgniteException: Invalid number of query parameters.
Cannot find 2 parameter.
> 	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.findParams(GridSqlQuerySplitter.java:634)
> 	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.findParams(GridSqlQuerySplitter.java:650)
> 	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.findParams(GridSqlQuerySplitter.java:650)
> 	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.findParams(GridSqlQuerySplitter.java:604)
> 	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split(GridSqlQuerySplitter.java:403)
> 	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split(GridSqlQuerySplitter.java:184)
> 	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:1277)
> 	at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:226)
> 	at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:134)
> 	at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsTwoStep(DmlStatementsProcessor.java:160)
> 	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:1266)
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:813)
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:811)
> 	at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1766)
> 	... 9 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message