Skip to content

Commit 85ee090

Browse files
edomatonicolas-grekas
authored andcommitted
[Lock] Check the correct SQLSTATE error code for MySQL
* Closes bug: #54091 Signed-off-by: Ernesto Domato <edomato@gmail.com>
1 parent a30f316 commit 85ee090

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Adapter/PdoAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ private function getServerVersion(): string
600600
private function isTableMissing(\PDOException $exception): bool
601601
{
602602
$driver = $this->driver;
603-
$code = $exception->getCode();
603+
$code = $exception->errorInfo ? $exception->errorInfo[1] : $exception->getCode();
604604

605605
switch (true) {
606606
case 'pgsql' === $driver && '42P01' === $code:

0 commit comments

Comments
 (0)