[jira] [Commented] (IGNITE-11251) SQL: getMoreResults() infinitely reports about update operation on zeroCursor

2019-04-18 Thread Alexander Lapin (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-11251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16821212#comment-16821212
 ] 

Alexander Lapin commented on IGNITE-11251:
--

[~rkondakov], thanks a lot, I've changed asserts with junit asserts within 
touched test classes.

[~amashenkov], [~isapego] could you please merge given ticket to master?

> 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)


[jira] [Commented] (IGNITE-11251) SQL: getMoreResults() infinitely reports about update operation on zeroCursor

2019-04-18 Thread Roman Kondakov (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-11251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16821148#comment-16821148
 ] 

Roman Kondakov commented on IGNITE-11251:
-

[~alapin], fix looks good for me. But anyway, IMO we should avoid using java 
{{assert}} keyword for checking test results in the future.

> 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)


[jira] [Commented] (IGNITE-11251) SQL: getMoreResults() infinitely reports about update operation on zeroCursor

2019-04-18 Thread Ignite TC Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-11251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16820989#comment-16820989
 ] 

Ignite TC Bot commented on IGNITE-11251:


{panel:title=--> Run :: All: Possible 
Blockers|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}Scala (Visor Console){color} [[tests 0 Exit Code 
|https://ci.ignite.apache.org/viewLog.html?buildId=3640884]]

{panel}
[TeamCity *--> Run :: All* 
Results|https://ci.ignite.apache.org/viewLog.html?buildId=3543122&buildTypeId=IgniteTests24Java8_RunAll]

> 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
>
> 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)