diff src/main/java/org/monetdb/jdbc/MonetConnection.java @ 433:b31eaa9e958f

fetchsize is allowed to be -1
author Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
date Wed, 10 Feb 2021 09:25:28 +0100 (2021-02-10)
parents f24b59110a7f
children 57d46c34c649
line wrap: on
line diff
--- a/src/main/java/org/monetdb/jdbc/MonetConnection.java
+++ b/src/main/java/org/monetdb/jdbc/MonetConnection.java
@@ -208,14 +208,14 @@ public class MonetConnection
 		if (fetchsize_prop != null) {
 			try {
 				int fetchsize = Integer.parseInt(fetchsize_prop);
-				if (fetchsize > 0) {
+				if (fetchsize > 0 || fetchsize == -1) {
 					this.defaultFetchSize = fetchsize;
 					conn_props.setProperty("fetchsize", fetchsize_prop);
 				} else {
-					addWarning("Fetch size must be positive. Value ignored", "M1M05");
+					addWarning("Fetch size must either be positive or -1. Value " + fetchsize + " ignored", "M1M05");
 				}
 			} catch (java.lang.NumberFormatException e) {
-				addWarning("Invalid fetch size.  Value ignored", "M1M05");
+				addWarning("Invalid fetch size.  Value '" + fetchsize_prop + "' ignored", "M1M05");
 			}
 		}