- Affected version
- 2.1.9
XenForo checks
However this is implemented via calling;
The problem is this causes a
A simple low-touch solution is the query which tests to see if there is anything in the table, which avoid table/index locking.
serverErrorLogs
to determine if it should display the "Server errors have been logged. You should review these." via a simple boolean check.However this is implemented via calling;
PHP:
$this->finder('XF:ErrorLog')->total()
The problem is this causes a
SELECT COUNT(*) FROM xf_error_log
to be run against the entire table. This requires locking, and if the error rate is high, then this can cause deadlocks and more errors.A simple low-touch solution is the query which tests to see if there is anything in the table, which avoid table/index locking.
PHP:
(bool)\XF::db()->fetchOne('SELECT error_id FROM xf_error_log LIMIT 1')