Skip to content
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

Correct minimum MariaDB version for CHECK_CONSTRAINTS #45326

Merged

Conversation

elebow
Copy link
Contributor

@elebow elebow commented Jun 10, 2022

Summary

According to the MariaDB documentation, CHECK_CONSTRAINTS is not supported until 10.2.22. https://mariadb.com/kb/en/information-schema-check_constraints-table/

@fatkodima
Copy link
Member

Check constraints are supported from 10.2.1, we only shouldn't use the check_constraints table to get them.
Do you want to update this PR with the suggested change?

@yahonda
Copy link
Member

yahonda commented Jun 12, 2022

I prefer this change to require newer maintenance versions of MariaDB rather than adding fixes for old maintenance versions of MariaDB like 10.2.1.

Would you add a changelog for this change?
CHECK_CONSTRAINTS has been added to MariaDB 10.3.10, so let's return false for MariaDB 10.3.9 or older versions of MariaDB 10.3 series.

@elebow elebow force-pushed the mariadb-adapter-check_constraints-minimum-version branch from 42f1439 to d60b257 Compare June 12, 2022 03:17
@elebow
Copy link
Contributor Author

elebow commented Jun 12, 2022

Updated version check for 10.3.x and added changelog entry.

@@ -1,3 +1,7 @@
* Adjust minimum MariaDB version for `CHECK_CONSTRAINTS` table.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "Adjust the minimum MariaDB version for check constraints support." ? CHECK_CONSTRAINTS is something internal one, not for Rails application developers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@elebow elebow force-pushed the mariadb-adapter-check_constraints-minimum-version branch from d60b257 to d5cbc24 Compare June 12, 2022 04:37
@yahonda yahonda merged commit a466272 into rails:main Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants