Bug #65040 New User Resource Limit: max_query_execution_time
Submitted: 19 Apr 2012 16:26 Modified: 20 May 2012 5:39
Reporter: Tim Gustafson Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5.5 OS:Any
Assigned to: CPU Architecture:Any

[19 Apr 2012 16:26] Tim Gustafson
Description:
I'd like to request a new feature that would allow an administrator to limit the execution time for any queries that a user might execute.  Something along the lines of:

grant usage on *.* to foo with max_query_execution_time 30;

Any query that the user "foo" executes would be killed after 30 seconds if it has not completed.

I'm requesting this feature for use on a shared mySQL server that students developing new software use and oftentimes those queries are, shall we say, less than optimized.  One user with a string of constant bad queries can bring the whole server to a crawl.  I'd rather roll back the current transaction and return an error to the user than let one user slow down the server for everyone else.

How to repeat:
This is not a bug; it's a feature request.
[19 Apr 2012 17:14] Valeriy Kravchuk
Check http://forge.mysql.com/worklog/task.php?id=1272 please. I think you request just a subset of features planned in frames of that worklog.
[19 Apr 2012 20:29] Davi Arnaut
That's available in Twitter MySQL (https://github.com/twitter/mysql/wiki/Statement-Timeout).
[21 May 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".