[8.x] Allow overriding the MySQL server version for database queue driver #35263
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.
Azure managed MySQL comes with the problem that PDO::ATTR_SERVER_VERSION will always return 5.6.42 even if the actual version is 8.0.x.
This is a known limitation since 2017 and it appears Microsoft has no intention of fixing the problem.
Therefore the fixes to deadlocks in the queues is not applied.
This PR incorporates the principle from PR 32708 in the database queue driver to support manually overrinding the database version.
As a side note, Drupal seems to be moving towards using
SELECT version()
instead ofPDO::ATTR_SERVER_VERSION
, but that's out of scope for this PR.