Skip to content

Conversation

marschall
Copy link
Contributor

@marschall marschall commented Jun 11, 2017

@Naros
Copy link
Member

Naros commented Jun 14, 2017

The only concern I have with necessarily dropping in MariaDB 10.3 support just yet is that the release is still deemed alpha and obviously things could change between now and a stable release.

Beyond that, I linked HHH-11769 because that JIRA was to look at support for MariaDB 10.1 and up where the following notable features were included:

MariaDB 10.0

  • CREATE OR REPLACE TABLE
  • IF (NOT) EXISTS ALTER TABLE

MariaDB 10.1

  • IF EXISTS
  • IF NOT EXISTS
  • OR REPLACE

We might want to check schema tooling to see if we could make use of these.

MariaDB 10.2

  • WITH statement support
  • Persistent AUTO_INCREMENT support

We may want to see what benefits the WITH statement offers us for this dialect version and whether any considerations are necessary wrt persistent AUTO_INCREMENT on InnoDB now.

MariaDB 10.3

  • Sequence support (as your change includes)
  • INTERSECT keyword support
  • EXCEPT keyword support
  • ...

@vladmihalcea Any thoughts since you worked on these MariaDB dialects previously?

@marschall
Copy link
Contributor Author

@Naros yes, this was just the very minimum to get sequences in 10.3 working. What also has to be noted is that the MariaDB dialects are currently not referenced in in StrategySelectorBuilder and StandardDialectResolver. Unfortunately MariaDB identifies itself as MySQL so this is a bit tricky. If you have a feature branch for 10.x somewhere I can cherry pick this commit to that branch.

@Naros
Copy link
Member

Naros commented Jun 15, 2017

It probably isn't in the builder/resolver instances because it doesn't identify itself differently from MySQL and therefore its a developer override choice to preserve backward compatibility.

Also we don't have a feature branch for 10.x either. I was merely adding my input wrt the other MariaDB 10.x versions in case we wanted to consolidate the features into HHH-11769 since that JIRA focuses on all features in the 10.x release stream and not just a specific 10.x feature.

@marschall
Copy link
Contributor Author

The dialect could be identified by assuming version >= 10 means MariaDB, this works for now but will likely fail at some point in the future when MySQL releases version 10. An other option would be to take the driver name into account. In this case people running MariaDB with the MySQL driver would still be defaulting to MySQL but this matches the current behavior.

So where do we go from here? I could also implement the corresponding supportsIfExists(Before|After)Name methods. Personally I would prefer if the different aspects you mentioned could be split into different issues or subtasks. For me personally sequence support is the most important one.

@vladmihalcea
Copy link
Contributor

As @Naros pointed out, we could add multiple MariaDB10 Dialect options: 10.0, 10.1, 10.2, 10.3 as long as each one provides a new feature that Hibernate can use.

There is no risk of conflict with MySQL since we now use different Dialects and they just inherit from the base MySQL Dialect. Everything new is added to the explicit Dialect types.

@vladmihalcea
Copy link
Contributor

vladmihalcea commented Mar 27, 2018

Integrated this PR. Validate all @Naros findings as well.

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