Support query timeouts with mysqli on the client side
Summary:
Ref T10849. I'm going to wait for the release cut to pursue this since it's the kind of change that could cause weird stuff to happen, but it appears to work properly.
To execute a query with a timeout, we use the MySQLi "async" API, and just resolve the query synchronously inline. This lets us throw if too much time has passed.
Test Plan:
- Added a SELECT SLEEP(10) on the home page.
- Set a 3 second query timeout.
- Saw the query abort properly after a few seconds.
- Browsed around normally to test SELECT, etc.
- Created some objects to test INSERT, UPDATE, etc.
Reviewers: chad
Reviewed By: chad
Maniphest Tasks: T10849
Differential Revision: https://secure.phabricator.com/D15781