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

Support batch operation for creating/dropping binding by specifying digests #55343

Closed
time-and-fate opened this issue Aug 9, 2024 · 1 comment · Fixed by #55315
Closed

Support batch operation for creating/dropping binding by specifying digests #55343

time-and-fate opened this issue Aug 9, 2024 · 1 comment · Fixed by #55315
Assignees
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@time-and-fate
Copy link
Member

Enhancement

TiDB supports two kinds of statements:

create [session | global] binding from history using plan digest stringLiteral
drop [session | global] binding for sql digest stringLiteral

Currently, the user can only specify one digest in a statement. We will enhance it so the user can specify multiple digests by using string literal or user variable.

@time-and-fate time-and-fate added the type/enhancement The issue or PR belongs to an enhancement. label Aug 9, 2024
@time-and-fate time-and-fate self-assigned this Aug 9, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in 1f40cb0 Aug 12, 2024
@time-and-fate
Copy link
Member Author

time-and-fate commented Aug 13, 2024

Tests

Creating and dropping bindings can work correctly as in previous single digest cases in the cases below.

  • Mix string literals and user variables together.
  • Empty strings in the input should be ignored.
  • When creating bindings, if multiple input plan digests correspond to the same SQL digest, then only the first one should be effective, the others should be ignored and warnings should be output.
  • Atomic: if creating/dropping for one of the input digests fails, the entire SQL should fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant