pingcap / pingcap/tidb

SQL Binding result changed after upgrade to nightly from v8.4.0

Open
#60,591 1 comment 0 reactions 0 assignees View on GitHub
affects-8.5 impact/upgrade sig/planner type/bug
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)

1. execute following SQL sentences in v8.4.0
`use test;`
`drop table if exists t;`
`create table t(a int, b int, c int, index idx(a));`
`create global binding for select * from t where a < 1 using select * from t use index(idx) where a < 1;`
`create global binding for select * from t where a < 1 using select * from t ignore index(idx) where a < 1;`

`drop database if exists spm;`
`create database spm;`
`use spm;`
`create global binding for select * from test.t where a <= 1 using select * from test.t use index(idx) where a <= 1;`
`create global binding for select * from test.t where a <= 1 using select * from test.t ignore index(idx) where a <= 1;`
2. upgrade to nightly
3. `show global bindings;`
### 2. What did you expect to see? (Required)
![Image](https://github.com/user-attachments/assets/53951bec-5d35-48e6-9d93-560a7cbdade6)

### 3. What did you see instead (Required)
![Image](https://github.com/user-attachments/assets/1a97bb6f-8d46-4476-99fc-a610ee94150b)

### 4. What is your TiDB version? (Required)

| Release Version: v9.0.0-beta.1.pre-572-g4133e9e
Edition: Community
Git Commit Hash: 4133e9e71a321674de0cbe816cf863cb4886f37e
Git Branch: HEAD
UTC Build Time: 2025-04-15 14:25:48
GoVersion: go1.23.8
Race Enabled: false
Check Table Before Drop: false
Store: tikv |

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.