use the result set to set the fetchsize
This commit is contained in:
parent
f590a5ea72
commit
f4b4d7ce60
|
@ -82,7 +82,7 @@ public class CursorFetchTest extends TestCase
|
||||||
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
|
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
|
||||||
stmt.setFetchSize(0);
|
stmt.setFetchSize(0);
|
||||||
ResultSet rs = stmt.executeQuery();
|
ResultSet rs = stmt.executeQuery();
|
||||||
stmt.setFetchSize(50); // Should have no effect.
|
rs.setFetchSize(50); // Should have no effect.
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
|
@ -108,7 +108,7 @@ public class CursorFetchTest extends TestCase
|
||||||
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
|
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
|
||||||
stmt.setFetchSize(25);
|
stmt.setFetchSize(25);
|
||||||
ResultSet rs = stmt.executeQuery();
|
ResultSet rs = stmt.executeQuery();
|
||||||
stmt.setFetchSize(0);
|
rs.setFetchSize(0);
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
|
@ -136,7 +136,7 @@ public class CursorFetchTest extends TestCase
|
||||||
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
|
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
|
||||||
stmt.setFetchSize(25);
|
stmt.setFetchSize(25);
|
||||||
ResultSet rs = stmt.executeQuery();
|
ResultSet rs = stmt.executeQuery();
|
||||||
stmt.setFetchSize(50);
|
rs.setFetchSize(50);
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
|
@ -164,7 +164,7 @@ public class CursorFetchTest extends TestCase
|
||||||
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
|
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
|
||||||
stmt.setFetchSize(50);
|
stmt.setFetchSize(50);
|
||||||
ResultSet rs = stmt.executeQuery();
|
ResultSet rs = stmt.executeQuery();
|
||||||
stmt.setFetchSize(25);
|
rs.setFetchSize(25);
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
|
|
Loading…
Reference in New Issue