Skip to content

ERROR 8066 when create binding for select statement with high_priority #57427

Open
@pcqz

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> create table t(a int, b int, key `i_a`(a));
Query OK, 0 rows affected (0.03 sec)

mysql> explain select /*+ use_index(t, i_a) */ high_priority * from t;
+-------------------------------+----------+-----------+-----------------------+--------------------------------+
| id                            | estRows  | task      | access object         | operator info                  |
+-------------------------------+----------+-----------+-----------------------+--------------------------------+
| IndexLookUp_6                 | 10000.00 | root      |                       |                                |
| ├─IndexFullScan_4(Build)      | 10000.00 | cop[tikv] | table:t, index:i_a(a) | keep order:false, stats:pseudo |
| └─TableRowIDScan_5(Probe)     | 10000.00 | cop[tikv] | table:t               | keep order:false, stats:pseudo |
+-------------------------------+----------+-----------+-----------------------+--------------------------------+
3 rows in set (0.00 sec)

mysql> create binding for select high_priority * from t using select /*+ use_index(t, i_a) */ high_priority * from t;
ERROR 8066 (HY000): Optimizer hint can only be followed by certain keywords like SELECT, INSERT, etc.

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

NO ERROR

3. What did you see instead (Required)

ERROR 8066

4. What is your TiDB version? (Required)

v8.3.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions