# HG changeset patch # User Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> # Date 1612945528 -3600 # Node ID b31eaa9e958fb87e2c7f9513696f6f920e2c476c # Parent f24b59110a7fb52902c7a94018cec2236b1288aa fetchsize is allowed to be -1 diff --git a/release.txt b/release.txt --- a/release.txt +++ b/release.txt @@ -25,7 +25,7 @@ Supported connection properties are: treat_clob_as_varchar=false default is: true treat_blob_as_binary=false default is: true language=<sql or mal> default is: sql - fetchsize=<nr of rows> default is: 250 + fetchsize=<nr of rows> default is: 250; -1 means fetch everything at once debug=true default is: false logfile=<name of logfile> hash=<SHA512, SHA384, SHA256 or SHA1> diff --git a/src/main/java/org/monetdb/jdbc/MonetConnection.java b/src/main/java/org/monetdb/jdbc/MonetConnection.java --- 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"); } }