Skip to content

Commit 116c7c5

Browse files
bug #54201 [Lock] Check the correct SQLSTATE error code for MySQL (edomato)
This PR was merged into the 5.4 branch. Discussion ---------- [Lock] Check the correct SQLSTATE error code for MySQL * Closes bug: #54091 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #54091 | License | MIT Commits ------- 7318816fb2 [Lock] Check the correct SQLSTATE error code for MySQL
2 parents bb7170f + ce901e8 commit 116c7c5

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)