index name can be ignored in USE_INDEX hint
Open
sig/planner
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```sql
CREATE GLOBAL BINDING FOR select * from t where ... USING select /*+ USE_INDEX(t) */ * from t where ...
```
### 2. What did you expect to see? (Required)
Bind statement above should be invalid, there must have a index name for USE_INDEX(t, indexname, [indexname...])
### 3. What did you see instead (Required)
Bind statement above was applied, and sql start with table full scan.
### 4. What is your TiDB version? (Required)
Server version: 5.7.25-TiDB-v5.2.3
Contributor guide
Assessment
This issue has not been assessed yet.