-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAX_EXECUTION_TIME behavior differences from MySQL #10955
Labels
type/bug
The issue is confirmed as a bug.
Comments
@tiancaiamao PTAL |
I'll take a look @morgo |
This one fixes the "sleep" problem |
tiancaiamao
added a commit
to tiancaiamao/tidb
that referenced
this issue
Jun 27, 2019
…work update go.mod to use the latest parser which fix the sql hint for MAX_EXECUTION_TIME put max_execution_time into the auto load system variable list so it's correctly initialized Fix issue pingcap#10955
And this one fixes the SQL hint and set global var |
I can still reproduce issues 2 and 4 (both should be fixed in #10959 ). I will add a "Fixes" in the issue description.
and:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Please answer these questions before submitting your issue. Thanks!
MAX_EXECUTION_TIME was recently added in #7008
I noticed a few behavior differences from MySQL.
TiDB supports
set max_execution_time=1000;
, but does not support using this as a hint. This is important for languages such as Go, where connection pools (unless using a transaction) may share connections between gorountines. Thus, setting a session var is unreliable:The second issue is that when interrupting a sleep'ed query, MySQL will just have the sleep function return 1. TiDB instead returns an error:
A third issue is that the setting the global var did not work as expected:
A fourth issue is that the sleep function does not seem to cancel/interrupt. The query still runs for 60 seconds, even though it is only supposed to run for 100ms (this is different from 3rd issue, note the error message):
tidb-server -V
or runselect tidb_version();
on TiDB)?The text was updated successfully, but these errors were encountered: