You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexander Lapin (JIRA)" <ji...@apache.org> on 2019/04/18 11:44:00 UTC
[jira] [Comment Edited] (IGNITE-11251) SQL: getMoreResults()
infinitely reports about update operation on zeroCursor
[ https://issues.apache.org/jira/browse/IGNITE-11251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16820991#comment-16820991 ]
Alexander Lapin edited comment on IGNITE-11251 at 4/18/19 11:43 AM:
--------------------------------------------------------------------
[~rkondakov], could you please take a look? Scala blocker is actually not a blocker.
was (Author: alapin):
[~rkondakov], could you please take a look, scala blocker is actually not a blocker.
> SQL: getMoreResults() infinitely reports about update operation on zeroCursor
> -----------------------------------------------------------------------------
>
> Key: IGNITE-11251
> URL: https://issues.apache.org/jira/browse/IGNITE-11251
> Project: Ignite
> Issue Type: Bug
> Components: jdbc, sql
> Reporter: Pavel Kuznetsov
> Assignee: Alexander Lapin
> Priority: Major
> Labels: jdbc
> Fix For: 2.8
>
>
> If we got sql query that contain empty statement, jdbc thin driver will allways return {{true}} from {{getMoreResults}} method.
> Jdbc spec says:
> {noformat}
> oves to this Statement object's next result, returns true if it is a ResultSet object,
> <...>
> Returns:
> true if the next result is a ResultSet object; false if it is an update count or there are no more results
> {noformat}
> so test :
> {code:java}
> @Test
> public void test () throws Exception {
> try (Connection c = GridTestUtils.connect(grid(0), null)) {
> try (PreparedStatement p = c.prepareStatement(";")) {
> boolean isResultSet = p.execute();
> // Adding next line works the problem around:
> // p.getUpdateCount() == 0;
>
> boolean isResultSetReturned = p.getMoreResults();
>
> // should be false:
> assertFalse(isResultSetReturned); // == true
> }
> }
> }
> {code}
> {{getResultSet}} is {{null}} in this case.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)