Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-27814

Add support for MySQL error codes in DB exceptions

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Customer request, 5.4.10
    • Fix Version/s: 5.4.11-rc, 2017.10
    • Component/s: Legacy stack
    • Labels:
      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).

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            kamil.madejski@ez.no Kamil Madejski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: