Closed glkappe closed 2 weeks ago
The current behavior of max_execution_time is by design(not a bug), I will treat it as an enhancement.
To me it is a feature that max_execution_time
applies to update
and delete
, not only select
. It is a dangerous implementation in MySQL. That said, maybe perfect compatibility is more important.
To me it is a feature that
max_execution_time
applies toupdate
anddelete
, not onlyselect
. It is a dangerous implementation in MySQL. That said, maybe perfect compatibility is more important.
MySQL implements MVCC differently, so rolling back a statement can be something like 30x more expensive than the corresponding apply. If the limit applied to all statements, there is a high risk that under some loads DMLs could hit the threshold and effectively DoS the server.
Since TiDB does not have this issue, I think it is quite a reasonable feature extension. But we can perhaps leave this open as a feature request and if there is a lot of user feedback, we can change it.
After https://github.com/pingcap/tidb/pull/38671, max_execution_time
only affects read-only query just like MySQL, so close this issue.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
The first point:Does not take effect for ddl statements
run long time, it > max_execution_time
secondy point:
This may affect the normal execution of other sql, it is recommended to only leave the select, consistent with mysql