comparison src/main/java/org/monetdb/jdbc/MonetConnection.java @ 660:7ec8d469fd0b

Adapt the cacheSize to the actual fetch size instead of using the default fetch size. Otherwise we get IndexOutOfBoundsExceptions if the fetchsize setting is set too small (<100).
author Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
date Tue, 11 Oct 2022 13:15:01 +0200 (2022-10-11)
parents 108123ca6889
children 8f7d51c478df
comparison
equal deleted inserted replaced
659:0b564ae68ac1 660:7ec8d469fd0b
2280 if (parent.cachesize == 0) { 2280 if (parent.cachesize == 0) {
2281 /* Below we have to calculate how many "chunks" we need 2281 /* Below we have to calculate how many "chunks" we need
2282 * to allocate to store the entire result. However, if 2282 * to allocate to store the entire result. However, if
2283 * the user didn't set a cache size, as in this case, we 2283 * the user didn't set a cache size, as in this case, we
2284 * need to stick to our defaults. */ 2284 * need to stick to our defaults. */
2285 cacheSize = MonetConnection.DEF_FETCHSIZE; 2285 cacheSize = defaultFetchSize;
2286 cacheSizeSetExplicitly = false; 2286 cacheSizeSetExplicitly = false;
2287 } else { 2287 } else {
2288 cacheSize = parent.cachesize; 2288 cacheSize = parent.cachesize;
2289 cacheSizeSetExplicitly = true; 2289 cacheSizeSetExplicitly = true;
2290 } 2290 }