Fix MariaDB fetching of default table character-set#6425
Merged
derrabus merged 1 commit intodoctrine:3.8.xfrom Jun 7, 2024
grooverdan:fix_6361
Merged
Fix MariaDB fetching of default table character-set#6425derrabus merged 1 commit intodoctrine:3.8.xfrom grooverdan:fix_6361
derrabus merged 1 commit intodoctrine:3.8.xfrom
grooverdan:fix_6361
Conversation
Contributor
Author
|
SQL example: |
From MariaDB-10.10.1, where uca1400 was added, the information_schema.COLLATION_CHARACTER_SET_APPLICABILITY was extended to have FULL_COLLATION_NAME which corresponds to the information_schema.TABLES.TABLE_COLLATION value. Executable comment syntax is used to limited to the applicable versions. To preserve compatibility with older MariaDB versions, and MySQL versions where the previous COLLATION_NAME was the match is left as a JOIN critieria. In new MariaDB versions this won't result in an extra row match. Closes: #6361
derrabus
reviewed
Jun 7, 2024
Comment on lines
-570
to
+576
| ON ccsa.COLLATION_NAME = t.TABLE_COLLATION | ||
| ON /*M!101001 ccsa.FULL_COLLATION_NAME = t.TABLE_COLLATION OR */ | ||
| ccsa.COLLATION_NAME = t.TABLE_COLLATION |
Member
There was a problem hiding this comment.
I'd like to avoid version conditionals in SQL. We have our platform class hierarchy for this purpose.
I'll accept this change as a hotfix for MariaDB 11.4 on the 3.8.x branch. Can you work on a PR for 3.9.x that moves the SQL statement to AbstractMySQLPlatform and that introduces a new platform class for MariaDB 10.10 which overrides the generated SQL?
derrabus
approved these changes
Jun 7, 2024
derrabus
pushed a commit
that referenced
this pull request
Jun 8, 2024
<!-- Fill in the relevant information below to help triage your pull request. --> | Q | A |------------- | ----------- | Type | improvement | Fixed issues | N/A <!-- use #NUM format to reference an issue --> #### Summary Improve the CI to cover newer versions of MariaDB 11.4+. Also cover the quay.io/mariadb-foundation/mariadb-devel images from https://quay.io/repository/mariadb-foundation/mariadb-devel?tab=tags where they are updated with completed, reviewed and tested changes in the MariaDB server main branch. These are completed features/bug fixes in the next server version. As such this is a good thing to test before the users get the final product. ref: https://mariadb.org/new-service-quay-io-mariadb-foundation-mariadb-devel/ The test failures here are fixed by #6425. <!-- Provide a summary of your change. -->
derrabus
added a commit
that referenced
this pull request
Jun 14, 2024
* 4.0.x: CI: Update MariaDB versions (#6426) CI MariaDB: add 11.4, remove 11.0 (#6432) Display warnings when running PHPUnit in CI (#6431) Fix typo in the portability documentation (#6430) Fix MariaDB fetching of default table character-set (#6361) (#6425) Fix the portability documentation (#6429) Update tests/Platforms/AbstractPlatformTestCase.php Update tests/Platforms/AbstractPlatformTestCase.php add test Fix: Skip type comparison if disableTypeComments is true
derrabus
added a commit
to derrabus/dbal
that referenced
this pull request
Jun 19, 2024
* 4.1.x: (25 commits) Simplify signature of fetchTableOptionsByTable Add MariaDb1010Platform for fetchTableOptionsByTable PHPUnit 10.5.21 (doctrine#6447) Move schema split for SQLite CREATE INDEX only (doctrine#6352) PHPStan 1.11.5 (doctrine#6446) Default to distinct union queries (doctrine#6439) Revert "Merge pull request doctrine#6413 from achterin/bugfix/foreign_key_name_change_detection" Add `QueryBuilder` support for `UNION` clause (doctrine#6369) CI: Update MariaDB versions (doctrine#6426) CI MariaDB: add 11.4, remove 11.0 (doctrine#6432) Display warnings when running PHPUnit in CI (doctrine#6431) Fix typo in the portability documentation (doctrine#6430) Fix MariaDB fetching of default table character-set (doctrine#6361) (doctrine#6425) Fix the portability documentation (doctrine#6429) Update tests/Platforms/AbstractPlatformTestCase.php Update tests/Platforms/AbstractPlatformTestCase.php add test Fix: Skip type comparison if disableTypeComments is true Remove redundant variable (doctrine#6326) Fix test names to reflect their actual purpose ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
From MariaDB-10.10.1, where uca1400 was added, the information_schema.COLLATION_CHARACTER_SET_APPLICABILITY was extended to have FULL_COLLATION_NAME which corresponds to the information_schema.TABLES.TABLE_COLLATION value.
Executable comment syntax is used to limited to the applicable versions.
To preserve compatibility with older MariaDB versions, and MySQL versions where the previous COLLATION_NAME was the match is left as a JOIN criteria. In new MariaDB versions this won't result in an extra row match.
Closes: #6361
The lack of this fix did case the CI test to fail with a MariaDB-11.0+ container:
With this fix all version of MySQL and MariaDB (even those new ones soon to be in a different PR) will pass like: https://github.com/grooverdan/dbal/actions/runs/9412110648/job/25926481038