osTicket/osTicket-1.8 — pull request #493 by greezybacon (2014-01-29 05:41:42+00:00)
Title: mysqli: Retry on deadlock-found error

If MySQL error #1213 (deadlock found when tryingo get lock) is returned from query, it is safe to retry the query.

This patch will retry queries up to two times for a total of three. If the query cannot be executed without error #1213 after the third time, the error is logged as usual, and the system continues with the failed query.