From aa5e1184a5560bff9ef23c033a358e240d8c7893 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Fri, 12 Apr 2024 15:29:06 +0200 Subject: [PATCH] Fix sybase LobSchemaUpdateTest failure --- .../java/org/hibernate/dialect/SybaseASEDialect.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASEDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASEDialect.java index 07d2af67ed..80e9b0c0b5 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASEDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASEDialect.java @@ -70,6 +70,10 @@ public class SybaseASEDialect extends SybaseDialect { Integer scale, Long length) { switch ( jdbcType.getDdlTypeCode() ) { + case Types.NCLOB: + case Types.CLOB: + case Types.BLOB: + return Size.length( getDefaultLobLength() ); case Types.FLOAT: // Sybase ASE allows FLOAT with a precision up to 48 if ( precision != null ) { @@ -164,6 +168,11 @@ public class SybaseASEDialect extends SybaseDialect { return 16_384; } + @Override + public long getDefaultLobLength() { + return Integer.MAX_VALUE; + } + private static boolean isAnsiNull(DialectResolutionInfo info) { final DatabaseMetaData databaseMetaData = info.getDatabaseMetadata(); if ( databaseMetaData != null ) {