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

bindings with ignore_plan_cache_hint cannot work #34596

Closed
qw4990 opened this issue May 12, 2022 · 4 comments · Fixed by #36427
Closed

bindings with ignore_plan_cache_hint cannot work #34596

qw4990 opened this issue May 12, 2022 · 4 comments · Fixed by #36427
Assignees
Labels
affects-6.1 This bug affects the 6.1.x(LTS) versions. epic/plan-cache severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@qw4990
Copy link
Contributor

qw4990 commented May 12, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

-- enable the plan-cache --
create table t (a int);
create binding for select * from t using select /*+ ignore_plan_cache() */ * from t;
prepare stmt from 'select * from t';
execute stmt;
execute stmt;
select @@last_plan_from_cache;

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

The second execute-stmt cannot hit the cache since we create a binding with ignore_plan_cache() for it.

3. What did you see instead (Required)

It can hit the cache.

4. What is your TiDB version? (Required)

Master

@qw4990 qw4990 added type/bug The issue is confirmed as a bug. sig/planner SIG: Planner severity/moderate epic/plan-cache labels May 12, 2022
@qw4990
Copy link
Contributor Author

qw4990 commented Jul 15, 2022

PTAL @fzzf678

@fzzf678
Copy link
Contributor

fzzf678 commented Jul 20, 2022

/assign @fzzf678

@glkappe
Copy link

glkappe commented Jul 21, 2022

do we have any plans to fix this

@fzzf678
Copy link
Contributor

fzzf678 commented Jul 21, 2022

do we have any plans to fix this

I'm working on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.1 This bug affects the 6.1.x(LTS) versions. epic/plan-cache severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants