Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f4b4d7c

Browse files
author
Dave Cramer
committed
use the result set to set the fetchsize
1 parent f590a5e commit f4b4d7c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/interfaces/jdbc/org/postgresql/test/jdbc2/CursorFetchTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void testResultSetFetchSizeOne() throws Exception
8282
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
8383
stmt.setFetchSize(0);
8484
ResultSet rs = stmt.executeQuery();
85-
stmt.setFetchSize(50); // Should have no effect.
85+
rs.setFetchSize(50); // Should have no effect.
8686

8787
int count = 0;
8888
while (rs.next()) {
@@ -108,7 +108,7 @@ public void testResultSetFetchSizeTwo() throws Exception
108108
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
109109
stmt.setFetchSize(25);
110110
ResultSet rs = stmt.executeQuery();
111-
stmt.setFetchSize(0);
111+
rs.setFetchSize(0);
112112

113113
int count = 0;
114114
while (rs.next()) {
@@ -136,7 +136,7 @@ public void testResultSetFetchSizeThree() throws Exception
136136
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
137137
stmt.setFetchSize(25);
138138
ResultSet rs = stmt.executeQuery();
139-
stmt.setFetchSize(50);
139+
rs.setFetchSize(50);
140140

141141
int count = 0;
142142
while (rs.next()) {
@@ -164,7 +164,7 @@ public void testResultSetFetchSizeFour() throws Exception
164164
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
165165
stmt.setFetchSize(50);
166166
ResultSet rs = stmt.executeQuery();
167-
stmt.setFetchSize(25);
167+
rs.setFetchSize(25);
168168

169169
int count = 0;
170170
while (rs.next()) {

0 commit comments

Comments
 (0)