[CONJ-436] ResultSet first() implementation Created: 2017-02-24  Updated: 2017-03-07  Resolved: 2017-03-07

Status: Closed
Project: MariaDB Connector/J
Component/s: JDBC 4.2 compatibility
Affects Version/s: 1.5.7
Fix Version/s: 1.5.9

Type: Bug Priority: Major
Reporter: Zsolt Janos Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None


 Description   

Hello,

we have upgraded our JDBC driver to mariadb driver from mysql driver and it has caused an unforeseen issue.

https://github.com/MariaDB/mariadb-connector-j/blob/master/src/main/java/org/mariadb/jdbc/internal/queryresults/resultset/MariaSelectResultSet.java

The SQLException is thrown but we think the SQLException should NOT be thrown if the rowPointer is already at 0 - because in this case, there is no backward movement.

This has not been an issue with our mysql jdbc driver.

I appreciate that the JDBC interface docs may not be clear on this, but i think it makes sense not to throw an exception if rowPointer == 0



 Comments   
Comment by Diego Dupin [ 2017-02-27 ]

Hi zsolt.janos

Right, JDBC indicate that absolute positionning must throw an exception when scroll type is TYPE_FORWARD_ONLY.
But in reallity, there is no reason for that when not in streaming, (setFetchSize set).

Will be done on next corrective version.

Generated at Thu Feb 08 03:15:39 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.