Is it possible to timeout a query in MySQL?
That is, if any query exceeds the time I specify, it will be killed by MySQL and it will return an error instead of waiti
Since MySQL 5.7.8 there is max_execution_time option that defines the execution timeout for SELECT statements.