Stéphane Rossé (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYTZmOGQ4N2Fk...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15647?atlOrigin=eyJpIjoiYTZmOG...
) HHH-15647 (
https://hibernate.atlassian.net/browse/HHH-15647?atlOrigin=eyJpIjoiYTZmOG...
) Subselect with long parameter wrongly cast to bigint for MySQL (
https://hibernate.atlassian.net/browse/HHH-15647?atlOrigin=eyJpIjoiYTZmOG...
)
Issue Type: Bug Affects Versions: 6.1.4 Assignee: Unassigned Attachments:
mysql_subselect_cast_bigint.zip Created: 31/Oct/2022 06:35 AM Environment: hibernate 6.1
MySQL 8.0 Priority: Major Reporter: Stéphane Rossé (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
A subselect with long parameter is wrongly cast to bigint for MySQL.
With a query like:
select rsrc,
( select count (mrk. key ) from bookmark as mrk where mrk. key =:identityKey) as
bookmarks
from resource as rsrc
The parameter identityKey is cast to bigint for MySQL which is incorrect, MySQL only
accepts here cast as signed or unsigned.
The example is oversimplified and match the test case attached.
(
https://hibernate.atlassian.net/browse/HHH-15647#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15647#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100209- sha1:5956172 )