Skip to content

Commit ce901e8

Browse files
edomatonicolas-grekas
authored andcommitted
[Lock] Check the correct SQLSTATE error code for MySQL
* Closes bug: #54091 Signed-off-by: Ernesto Domato <[email protected]>
1 parent b8b0d5b commit ce901e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Store/PdoStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ private function getCurrentTimestampStatement(): string
330330
private function isTableMissing(\PDOException $exception): bool
331331
{
332332
$driver = $this->getDriver();
333-
$code = $exception->getCode();
333+
$code = $exception->errorInfo ? $exception->errorInfo[1] : $exception->getCode();
334334

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

0 commit comments

Comments
 (0)