Use fetch size 1 instead of Integer.MIN_VALUE

This commit is contained in:
Flo
2022-08-10 19:26:40 +02:00
committed by GitHub
parent dd5bb3edff
commit e8afba7ed2
@@ -314,7 +314,7 @@ public final class CQuery<T> implements DbReadContext, CancelableQuery, SpiProfi
if (forwardOnlyHint) {
// Use forward only hints for large resultSet processing (Issue 56, MySql specific)
pstmt = conn.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
pstmt.setFetchSize(Integer.MIN_VALUE);
pstmt.setFetchSize(1);
} else {
pstmt = conn.prepareStatement(sql);
}