Skip to content

HHH-19558: [6.6 backport] Fixed support of JDBC escape syntax #10501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2025

Conversation

Stefan-Tri
Copy link
Contributor

@Stefan-Tri Stefan-Tri commented Jul 10, 2025

Same fix as #10369 for the 6.6 branch.
The unit test class does not exist on branch 6.6 and could not simply be moved over, without other changes.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-19558

@gavinking
Copy link
Member

We should be careful about backporting this one.

  1. It's not a bug as such, but rather an improvement.
  2. It's the first time in more than two decades anyone has ever asked for this.

I suppose it's pretty low risk, but it's even lower risk to ask anyone who wants this to update to seven.

@Stefan-Tri
Copy link
Contributor Author

This used to work in 6.5, which is why see this as a bug, or at least a new side effect of some recent changes.

@gavinking
Copy link
Member

gavinking commented Jul 10, 2025

Are you saying it worked before HHH-18215?

@Stefan-Tri
Copy link
Contributor Author

Yes, i think that was the reason

@beikov
Copy link
Member

beikov commented Jul 11, 2025

I guess this commit introduced this bug: 6435137

@gavinking
Copy link
Member

I guess this commit introduced this bug

Exactly as I suggested above:

Are you saying it worked before HHH-18215?

But, and yes, I'm going to keep hammering on this forever: it's not a "bug" if we never documented it anywhere and never had any tests for it.

The spec requires us to support SQL. It doesn't say anything about supporting SQL with weird JDBC escapes. The only place the spec mentions JDBC escapes is in this line:

The JDBC escape syntax may be used for the specification of date, time, and timestamp literals.

And that is referring to JPQL, not to SQL.

So if this worked, it worked by accident.

That said, I guess it's OK to backport this, as long as we're sure it doesn't break something else.

@Stefan-Tri
Copy link
Contributor Author

Good enough for me :)

It seems that I don't have the rights to merge this:

Merging is blocked
You're not authorized to push to this branch.

@beikov could you merge this please?

@beikov beikov merged commit 1cc2aef into hibernate:6.6 Jul 11, 2025
29 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants