Issue #3296108 by catch, dww, Spokje, mondrake: mysql_requirements() assumes it's used for the default connection

(cherry picked from commit fe941ffb61)
merge-requests/2359/head
xjm 2022-07-16 09:56:39 -05:00
parent 284ebff67d
commit ecd9a8ea1a
No known key found for this signature in database
GPG Key ID: 206B0B8743BDF4C2
1 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,10 @@ function mysql_requirements($phase) {
// Test with MySql databases.
if (Database::isActiveConnection()) {
$connection = Database::getConnection();
// Only show requirements when MySQL is the default database connection.
if (!($connection->driver() === 'mysql' && $connection->getProvider() === 'mysql')) {
return [];
}
$query = 'SELECT @@SESSION.tx_isolation';
// The database variable "tx_isolation" has been removed in MySQL v8.0 and