hibernate-orm icon indicating copy to clipboard operation
hibernate-orm copied to clipboard

HHH-15179 / HHH-15182

Open jrenaat opened this issue 3 years ago • 6 comments

HHH-15179 - Moving support for MySQL versions older than 5.7 into community dialects (https://hibernate.atlassian.net/browse/HHH-15179) HHH-15182 - Remove support for MariaDB versions older than 10.3 (https://hibernate.atlassian.net/browse/HHH-15182) Signed-off-by: Jan Schatteman [email protected]

jrenaat avatar Jun 07 '22 21:06 jrenaat

As discussed, the legacy versions are a simple (adapted) copy, no inheriting from the current counterparts, since that leads to undesired side-effects (e.g. the parent dialect adds things to certain registries that the legacy version does not support, and the overriden versions always call super())

jrenaat avatar Jun 09 '22 21:06 jrenaat

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

Added the MariaDB changes as a commit on top of this PR, since they're dependent.

jrenaat avatar Jun 17 '22 17:06 jrenaat

It seems that after you copied and renamed the original dialect to the hibernate-community-dialects module, you altered the legacy dialects/translators in ways that are wrong. You removed certain version checks or code blocks.

Please compare every legacy dialect and translator with a compare tool against the original dialect and translator from main, and make sure that the file contents match except for changes due to class renames. It seems that some of the changes you did were actually supposed to be done in some way for the dialect and translator in the hibernate-core module.

I actually do that, but if what you say is true then I have prob. messed up the sides of the compare somehow; I'll recheck everything for MariaDB.

jrenaat avatar Jun 20 '22 16:06 jrenaat

You seem to think that a legacy dialect should "only work" with versions smaller than the minimum version of the main dialect, but this is not true. In fact, it would also be too much work for us. We want less work though :)

So let's capture the intent again. Copy the original main dialect/translator as-is into the hibernate-community-dialects project, named like ...LegacyDialect/...LegacySqlAstTranslator. Only the main dialect is then changed:

  • Introduce a minimum version
  • Remove code that checks for versions smaller than the minimum version

beikov avatar Jun 21 '22 09:06 beikov

Some minor changes to dialect related tests

jrenaat avatar Jun 23 '22 20:06 jrenaat