[3.x] Get database server version from database so it works also with ProxySQL #312
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.
Pull Request for Issue #309
Summary of Changes
This pull request (PR) changes the
getVersion
methods of the "MySQLi" and "MySQL (PDO)" drivers so that they select the version from the database after the first connection instead of relying on the connection'sserver_info
in case of "MySQLi" orPDO::ATTR_SERVER_VERSION
in case of "MySQL (PDO)".The result is cached in a protected class variable so that the database query is only executed at the very first connection of the particular driver instance.
This makes it possible to use ProxySQL for a Joomla 5.x installation.
Testing Instructions
With ProxySQL see issue #309 .
Otherwise (without ProxySQL) check that the version returned by
getVersion()
is the same as without this PR for the same database, e.g. something like "10.11.7-MariaDB-log" for MariaDB or "8.0.39-0ubuntu0.22.04.1" for MySQL databases.Documentation Changes Required
None.