Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL bindings are not reload automatically after restore mysql.bind_info #46528

Open
benmaoer opened this issue Aug 30, 2023 · 0 comments
Open
Assignees
Labels
epic/sql-plan-management sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.

Comments

@benmaoer
Copy link

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 |
@benmaoer benmaoer added the type/bug The issue is confirmed as a bug. label Aug 30, 2023
@qw4990 qw4990 added sig/planner SIG: Planner epic/sql-plan-management type/enhancement The issue or PR belongs to an enhancement. and removed type/bug The issue is confirmed as a bug. labels Aug 30, 2023
@Leavrth Leavrth self-assigned this Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic/sql-plan-management sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

3 participants