Valentin Kulichenko created IGNITE-6807:
-------------------------------------------

             Summary: NPE is thrown if local query is executed on client
                 Key: IGNITE-6807
                 URL: https://issues.apache.org/jira/browse/IGNITE-6807
             Project: Ignite
          Issue Type: Bug
      Security Level: Public (Viewable by anyone)
          Components: sql
    Affects Versions: 2.3
            Reporter: Valentin Kulichenko


If a local query is executed on client node by mistake, ugly NPE is thrown:
{noformat}
Caused by: java.lang.NullPointerException
        at 
org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.segmentsCount(H2TreeIndex.java:162)
        at 
org.apache.ignite.internal.processors.query.h2.opt.GridH2IndexBase.threadLocalSegment(GridH2IndexBase.java:172)
        at 
org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.find(H2TreeIndex.java:177)
        at org.h2.index.BaseIndex.find(BaseIndex.java:128)
        at org.h2.index.IndexCursor.find(IndexCursor.java:169)
        at org.h2.table.TableFilter.next(TableFilter.java:468)
        at 
org.h2.command.dml.Select$LazyResultQueryFlat.fetchNextRow(Select.java:1452)
        at org.h2.result.LazyResult.hasNext(LazyResult.java:79)
        at org.h2.result.LazyResult.next(LazyResult.java:59)
        at org.h2.command.dml.Select.queryFlat(Select.java:519)
        at org.h2.command.dml.Select.queryWithoutCache(Select.java:625)
        at org.h2.command.dml.Query.queryWithoutCacheLazyCheck(Query.java:114)
        at org.h2.command.dml.Query.query(Query.java:352)
        at org.h2.command.dml.Query.query(Query.java:333)
        at org.h2.command.CommandContainer.query(CommandContainer.java:113)
        at org.h2.command.Command.executeQuery(Command.java:201)
        ... 21 more
{noformat}
We should detect this situation and throw proper exception instead.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to