Detect query timeouts and throw a specific exception
authorMatthew Flaschen <mflaschen@wikimedia.org>
Mon, 18 Sep 2017 11:38:59 +0000 (07:38 -0400)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 20 Sep 2017 08:47:09 +0000 (08:47 +0000)
commit3638695419bd7f3d82a78eff888a1353601b08ab
tree9d670bddbe5d15ce3b592539718a73fdf2f46303
parenta08d8261f12cf3329c2c8e725a555daf453215fe
Detect query timeouts and throw a specific exception

Throw DBQueryTimeoutError if a database query error is detected
to be a timeout.

Only DatabaseMysqlBase has been updated here.

This is a subclass of DBQueryError, so existing catch'es will work.

Bug: T175775
Change-Id: I4749dc33ad530d9b22504f02106b1ca49e8eb167
autoload.php
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/DatabaseMysqlBase.php
includes/libs/rdbms/exception/DBQueryError.php
includes/libs/rdbms/exception/DBQueryTimeoutError.php [new file with mode: 0644]