Skip to content
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

Some hints do not take effect for cached plan #45812

Closed
you06 opened this issue Aug 4, 2023 · 0 comments · Fixed by #45814
Closed

Some hints do not take effect for cached plan #45812

you06 opened this issue Aug 4, 2023 · 0 comments · Fixed by #45814

Comments

@you06
Copy link
Contributor

you06 commented Aug 4, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Prepare sysbench table with 1,000,000 rows.

mysql> prepare stmt from 'select /*+ MAX_EXECUTION_TIME(1) */ sum(id) from sbtest1';
Query OK, 0 rows affected (0.00 sec)

mysql> execute stmt;
mysql> execute stmt; -- run it two times

2. What did you expect to see? (Required)

mysql> execute stmt;
ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded
mysql> execute stmt;
ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded

3. What did you see instead (Required)

mysql> execute stmt;
ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded
mysql> execute stmt;
+--------------+
| sum(id)      |
+--------------+
| 501229432608 |
+--------------+
1 row in set (0.34 sec)

The second time executing this statament, the hint /*+ MAX_EXECUTION_TIME(1) */ do not take effect.

4. What is your TiDB version? (Required)

Release Version: v7.4.0-alpha
Edition: Community
Git Commit Hash: 522a00840385dfa43509a3af2bc79e6ff50252a8
Git Branch: heads/refs/tags/v7.4.0-alpha
UTC Build Time: 2023-08-03 14:26:07
GoVersion: go1.20.7
Race Enabled: false
Check Table Before Drop: false
Store: tikv
@you06 you06 added the type/bug The issue is confirmed as a bug. label Aug 4, 2023
@ti-chi-bot ti-chi-bot bot added may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Aug 4, 2023
@jebter jebter added the sig/planner SIG: Planner label Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants