Loading core/lib/Drupal/Core/Database/Driver/mysql/Connection.php +12 −4 Original line number Diff line number Diff line Loading @@ -65,6 +65,15 @@ class Connection extends DatabaseConnection { */ protected $needsCleanup = FALSE; /** * Stores the server version after it has been retrieved from the database. * * @var string * * @see \Drupal\Core\Database\Driver\mysql\Connection::version */ private $serverVersion; /** * The minimal possible value for the max_allowed_packet setting of MySQL. * Loading Loading @@ -290,11 +299,10 @@ protected function getMariaDbVersionMatch(): ?string { * The PDO server version. */ protected function getServerVersion(): string { static $server_version; if (!$server_version) { $server_version = $this->connection->query('SELECT VERSION()')->fetchColumn(); if (!$this->serverVersion) { $this->serverVersion = $this->connection->query('SELECT VERSION()')->fetchColumn(); } return $server_version; return $this->serverVersion; } public function databaseType() { Loading core/tests/Drupal/Tests/Core/Database/Driver/mysql/ConnectionTest.php +0 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ * * @coversDefaultClass \Drupal\Core\Database\Driver\mysql\Connection * @group Database * @runTestsInSeparateProcesses */ class ConnectionTest extends UnitTestCase { Loading Loading
core/lib/Drupal/Core/Database/Driver/mysql/Connection.php +12 −4 Original line number Diff line number Diff line Loading @@ -65,6 +65,15 @@ class Connection extends DatabaseConnection { */ protected $needsCleanup = FALSE; /** * Stores the server version after it has been retrieved from the database. * * @var string * * @see \Drupal\Core\Database\Driver\mysql\Connection::version */ private $serverVersion; /** * The minimal possible value for the max_allowed_packet setting of MySQL. * Loading Loading @@ -290,11 +299,10 @@ protected function getMariaDbVersionMatch(): ?string { * The PDO server version. */ protected function getServerVersion(): string { static $server_version; if (!$server_version) { $server_version = $this->connection->query('SELECT VERSION()')->fetchColumn(); if (!$this->serverVersion) { $this->serverVersion = $this->connection->query('SELECT VERSION()')->fetchColumn(); } return $server_version; return $this->serverVersion; } public function databaseType() { Loading
core/tests/Drupal/Tests/Core/Database/Driver/mysql/ConnectionTest.php +0 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ * * @coversDefaultClass \Drupal\Core\Database\Driver\mysql\Connection * @group Database * @runTestsInSeparateProcesses */ class ConnectionTest extends UnitTestCase { Loading