-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
planner: DELETE
cannot delete data in some cases when the database name is capitalized (#21202)
#21205
planner: DELETE
cannot delete data in some cases when the database name is capitalized (#21202)
#21205
Conversation
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
/run-all-tests |
@winoros you're already a collaborator in bot's repo. |
executor/delete_test.go
Outdated
"github.com/pingcap/tidb/util/testkit" | ||
) | ||
|
||
func (s *testSuite8) TestDeleteLockKey(c *C) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@winoros this test is unexpected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
d8ca695
to
aa4a650
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
/run-all-tests |
cherry-pick #21202 to release-3.0
What problem does this PR solve?
Issue Number: close #21200
Problem Summary:
The
CurrentDB
in session vars is stored the original string representation. (i.e. if we create the database name astEsT1
, theCurrentDB
would betEsT1
.However, in the codes that we changed in the pr, we treat the
CurrentDB
as its lower representation. This leads to wrong string comparison result. SoDELETE
might not delete the data correctly.What is changed and how it works?
Proposal: xxx
What's Changed:
Wrap
CIStr
upon theCurrentDB
.Related changes
Check List
Tests
Release note
DELETE
may not delete data correctly when the database name is not in pure lower representation.