[jOOQ/jOOQ#11485] Some RDBMS seem to prepend + to large years, e.g. +10000-01-01

This commit is contained in:
Lukas Eder 2023-08-18 15:26:49 +02:00
parent 2436f94c42
commit 796da54e34
2 changed files with 8 additions and 2 deletions

View File

@ -3319,7 +3319,13 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
int length;
for (length = 0; length < maxLength && (pos + length) < string.length(); length++) {
int digit = string.charAt(pos + length) - '0';
char c = string.charAt(pos + length);
// [#11485] Some RDBMS seem to prepend + to large years, e.g. +10000-01-01
if (c == '+' && length == 0)
continue;
int digit = c - '0';
if (digit >= 0 && digit < 10)
result = result * 10 + digit;

View File

@ -115,7 +115,7 @@ implements
private static final Set<SQLDialect> REQUIRES_CAST_ON_LIKE = SQLDialect.supportedBy(DERBY, POSTGRES, YUGABYTEDB);
private static final Set<SQLDialect> NO_SUPPORT_ILIKE = SQLDialect.supportedBy(CUBRID, DERBY, FIREBIRD, HSQLDB, MARIADB, MYSQL, SQLITE);
private static final Set<SQLDialect> NO_SUPPORT_ILIKE = SQLDialect.supportedBy(CUBRID, DERBY, FIREBIRD, HSQLDB, MARIADB, MYSQL, SQLITE, TRINO);
@Override
public final void accept(Context<?> ctx) {