Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upHHH-13969 Fix handling of large varbinary in SybaseASE15Dialect #3367
Conversation
@@ -30,6 +30,8 @@ | |||
public SybaseASE15Dialect() { | |||
super(); | |||
|
|||
registerColumnType( Types.VARBINARY, "image" ); | |||
registerColumnType( Types.VARBINARY, 8000, "varbinary($l)" ); |
This comment has been minimized.
This comment has been minimized.
NathanQingyangXu
Sep 5, 2020
Contributor
8000
is the max length for SQLServer. Should we use 32767
instead here?
This comment has been minimized.
This comment has been minimized.
gavinking
Sep 5, 2020
Member
That's what I decided it should be for Sybase Anywhere. (But apparently for ASE it depends on the version.)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Noupoi
Sep 7, 2020
Author
Yep, it's based on the database page size which is configurable.
On reflection, we should look up and use the actual page size instead of a fixed value of 8000
.
I couldn't find a quick way to do this after looking through the other dialects.
Can you give any pointers to how this would be done? I would be happy to give that a go.
Sorry, I have zero experience on SyBase, but I guess there must be some way.
…On Mon, Sep 7, 2020 at 3:11 PM Noupoi ***@***.***> wrote:
*@Noupoi* commented on this pull request.
------------------------------
In
hibernate-core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java
<#3367 (comment)>
:
> @@ -30,6 +30,8 @@
public SybaseASE15Dialect() {
super();
+ registerColumnType( Types.VARBINARY, "image" );
+ registerColumnType( Types.VARBINARY, 8000, "varbinary($l)" );
Yep, it's based on the database page size which is configurable.
On reflection, we should look up and use the actual page size instead of a
fixed value of 8000.
I couldn't find a quick way to do this after looking through the other
dialects.
Can you give any pointers to how this would be done? I would be happy to
give that a go.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3367 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB6UYAUNR5KOCXXVVWQSQVDSEUV5VANCNFSM4MORW2JA>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Noupoi commentedApr 22, 2020
https://hibernate.atlassian.net/browse/HHH-13969
Updates the handling of the VARBINARY type so when a using column size larger than what Sybase accepts, the
image
type is used instead.This change mirrors the behaviour of other Transact-SQL dialects such as SQLServerDialect.
Document on
varbinary
- size only goes up to 16K:https://wiki.ispirer.com/sqlways/sybase/data-types/varbinary
Document on the
image
type:https://wiki.ispirer.com/sqlways/sybase/data-types/image