Fix handling of large varbinary for SAP/Sybase ASE
Description
Activity
Show:
![](https://secure.gravatar.com/avatar/61a63fed50c84da73ec134c652cdfd27?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FGK-1.png)
Gavin King November 23, 2024 at 7:36 AMEdited
This issue was mostly, but not perfectly, already addressed in Hibernate 6.0.
As of H7, SybaseASEDialect will now query the @@maxpagesize
at startup. This was something I've been meaning to implement for a while. It's done now.
Fixed
Created April 22, 2020 at 9:39 PM
Updated 6 hours ago
Resolved November 23, 2024 at 7:36 AM
In ASE, the VARBINARY type has max size equal to the pagesize.
https://wiki.ispirer.com/sqlways/sybase/data-types/varbinary
When a VARBINARY type is requested that is longer than the max size, we should use the IMAGE type instead:
https://wiki.ispirer.com/sqlways/sybase/data-types/image
This should mirror the behaviour of other Transact SQL dialects such as SQLServerDialect:
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java#L42