Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.4.2
-
None
-
MariaDB Server 10.0.22 on FreeBSD 10.3
Description
Using Statement setFetchSize causes ResultSet#getNext to return always true.
To reproduce the bug the following code snippet can be used.
Statement stmt;
ResultSet rs;
stmt = null;
rs = null;
stmt = conn.createStatement();
stmt.execute("DROP TABLE IF EXISTS TEST");
stmt.execute("CREATE TABLE TEST (MYID INTEGER NOT NULL PRIMARY KEY, MYTEXT VARCHAR(20))");
stmt.execute("INSERT INTO TEST VALUES(1, 'test1')");
stmt.setFetchSize(10);
rs = stmt.executeQuery("SELECT MYID, MYTEXT FROM TEST");
while (rs.next())
{ System.out.println(rs.getString(2)); }rs.close();
stmt.execute("DROP TABLE TEST");
stmt.close();