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's server_info in case of "MySQLi" or PDO::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.
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.