MySQL upsert() uses an alias for the insert row values when the database version is 8+.
But this is actually only possible starting with version 8.0.19.
Existing property MysqlDialect.isMysql8 calls isVersionCovers(), which only fetches the database's major and minor version, so it is not sufficient for this comparison.
To get the patch version as well requires fetching metadata using the full databaseProductVersion property.
Tested locally with MySQL docker images 8.0.35, 8.0.19, 8.0.18, and 8.0.13.
MySQL
upsert()
uses an alias for the insert row values when the database version is 8+. But this is actually only possible starting with version 8.0.19.Existing property
MysqlDialect.isMysql8
callsisVersionCovers()
, which only fetches the database's major and minor version, so it is not sufficient for this comparison. To get the patch version as well requires fetching metadata using the fulldatabaseProductVersion
property.Tested locally with MySQL docker images 8.0.35, 8.0.19, 8.0.18, and 8.0.13.