Details
-
Improvement
-
Resolution: Fixed
-
High
-
Customer request, 5.4.10
-
None
Description
The customer requested to add support for handling MySQL error codes in DB exceptions.
The customer proposed PR:
https://github.com/ezsystems/ezpublish-legacy/pull/1315
Since eZ Publish 4.5, we can catch DB exceptions: https://github.com/ezsystems/ezpublish-legacy/blob/master/doc/features/4.5/ezdb_exception_based_error_handling.txt
However, the error code in the DB exception is always 0. This pull request logs the MySQL error code in the exception code so that you can specifically catch error codes (such as deadlocks) and act accordingly (such as retrying the transaction).