SQL bindings are not reload automatically after restore mysql.bind_info
- 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)
Restore mysql.bind_info from backup
```
tiup br restore full --pd "127.0.0.1:2379" --storage "s3://us-west-2-demo-bucket-backup/full/snapshot-20230830?access-key=xxxx&secret-access-key=xxxx" --filter 'mysql.bind_info' --with-sys-table --log-file restore.log
```
### 2. What did you expect to see? (Required)
After restore table, the SQL bindings are reload automatically.
### 3. What did you see instead (Required)
After restore table, the SQL bindings are not reload automatically.
```
mysql> show global bindings;
Empty set (0.00 sec)
mysql> select * from bind_info;
+----------------------------------------------------------------+------------------------------------------------------------------------------------------+------------+---------+-------------------------+-------------------------+---------+-------------+---------+------------------------------------------------------------------+-------------+
| original_sql | bind_sql | default_db | status | create_time | update_time | charset | collation | source | sql_digest | plan_digest |
+----------------------------------------------------------------+------------------------------------------------------------------------------------------+------------+---------+-------------------------+-------------------------+---------+-------------+---------+------------------------------------------------------------------+-------------+
| builtin_pseudo_sql_for_bind_lock | builtin_pseudo_sql_for_bind_lock | mysql | builtin | 0000-00-00 00:00:00.000 | 0000-00-00 00:00:00.000 | | | builtin | NULL | NULL |
| builtin_pseudo_sql_for_bind_lock | builtin_pseudo_sql_for_bind_lock | mysql | builtin | 0000-00-00 00:00:00.000 | 0000-00-00 00:00:00.000 | | | builtin | NULL | NULL |
| select * from `sbtest` . `sbtest1` where `id` > ? and `id` < ? | SELECT * FROM `sbtest`.`sbtest1` USE INDEX (`primary`) WHERE `id` > 1000 AND `id` < 4000 | sbtest | enabled | 2023-08-30 16:31:54.555 | 2023-08-30 16:31:54.555 | utf8mb4 | utf8mb4_bin | manual | ee99782e1182983034ce78bbf7c46b73e047d8c9b0bfef69f49523abacbd4688 | |
+----------------------------------------------------------------+------------------------------------------------------------------------------------------+------------+---------+-------------------------+-------------------------+---------+-------------+---------+------------------------------------------------------------------+-------------+
3 rows in set (0.00 sec)
```
### 4. What is your TiDB version? (Required)
```
| Release Version: v7.3.0
Edition: Community
Git Commit Hash: 40b72e7a9a4fc9670d4c5d974dd503a3c6097471
Git Branch: heads/refs/tags/v7.3.0
UTC Build Time: 2023-08-08 09:27:28
GoVersion: go1.20.7
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
```
Contributor guide
Assessment
This issue has not been assessed yet.