Closed anirudh-modi closed 1 week ago
The result is same as MySQL v8.4 and v9.0, you could use return value of sleep
function to verified it is killed or not.
See details https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_sleep
@Defined2014 Should not the select statement throw the error mentioned as there is a sleep statement which is taking more than max_execution_time
?
@Defined2014 Should not the select statement throw the error mentioned as there is a sleep statement which is taking more than
max_execution_time
?
Hi @anirudh-modi, You could read the MySQL docs.
When SLEEP() is only part of a query that is interrupted, the query returns an error:
Bug Report
I am using MySQL node js driver to connect to TiDb, I have set
max_execution_time
as 5seconds and when I running aselect sleep (40)
query, I am not getting any error.1. Minimal reproduce step (Required)
set max_execution_time = 5000
SELECT 1, SLEEP(40)
2. What did you expect to see? (Required)
I expected to see an error like
ER_QUERY_TIMEOUT
3. What did you see instead (Required)
TiDb gave a warning and there was no error from the MYSQL library. TiDb Logs can be found below
4. What is your TiDB version? (Required)