Is there a way to associate a time out to a query sent to the MySQL server?
Expected behavior
- MySQL server would trigger a time out if the query did not complete after a time T provided by the caller
- No result would be returned to the caller
- An error would be triggered instead (and caught by the caller).
Didn't find this in the MySQL documentation.
However it seems relevant: in case some indexes are missing or for some other reason, a time out would prevent the server to collapse (some queries may take hours to complete and will get cumulated in the server stack).