Skip to content

bindings with ignore_plan_cache_hint cannot work #34596

@qw4990

Description

@qw4990

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions