Mercurial > hg > monetdb-java
changeset 817:93b256bf29a7
Fix arithmetic overflow
author | Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> |
---|---|
date | Wed, 13 Dec 2023 13:29:39 +0100 (16 months ago) |
parents | 9188263368cc |
children | 4117aa40a6b9 3f288787fd77 |
files | src/main/java/org/monetdb/jdbc/MonetDatabaseMetaData.java src/main/java/org/monetdb/jdbc/MonetStatement.java |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/org/monetdb/jdbc/MonetDatabaseMetaData.java +++ b/src/main/java/org/monetdb/jdbc/MonetDatabaseMetaData.java @@ -1317,7 +1317,7 @@ public final class MonetDatabaseMetaData */ @Override public int getMaxBinaryLiteralLength() { - return 2*1024*1024*1024 - 2; // MonetDB supports null terminated strings of max 2GB, see function: int UTF8_strlen() + return 0x7ffffffe; // MonetDB supports null terminated strings of max 2GB, see function: int UTF8_strlen() } /** @@ -1327,7 +1327,7 @@ public final class MonetDatabaseMetaData */ @Override public int getMaxCharLiteralLength() { - return 2*1024*1024*1024 - 2; // MonetDB supports null terminated strings of max 2GB, see function: int UTF8_strlen() + return 0x7ffffffe; // MonetDB supports null terminated strings of max 2GB, see function: int UTF8_strlen() } /** @@ -1492,7 +1492,7 @@ public final class MonetDatabaseMetaData */ @Override public int getMaxStatementLength() { - return 2*1024*1024*1024 - 2; // MonetDB supports null terminated strings of max 2GB, see function: int UTF8_strlen() + return 0x7ffffffe; // MonetDB supports null terminated strings of max 2GB, see function: int UTF8_strlen() } /**
--- a/src/main/java/org/monetdb/jdbc/MonetStatement.java +++ b/src/main/java/org/monetdb/jdbc/MonetStatement.java @@ -689,7 +689,7 @@ public class MonetStatement */ @Override public int getMaxFieldSize() { - return 2*1024*1024*1024 - 2; // MonetDB supports null terminated strings of max 2GB, see function: int UTF8_strlen() + return 0x7ffffffe; // MonetDB supports null terminated strings of max 2GB, see function: int UTF8_strlen() } /**