-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
bindinfo: avoid duplicate bindings caused by concurrent baseline capture (#22182) #22295
bindinfo: avoid duplicate bindings caused by concurrent baseline capture (#22182) #22295
Conversation
/run-all-tests |
@eurekaka you're already a collaborator in bot's repo. |
bindinfo/bind_test.go
Outdated
@@ -1761,6 +1761,54 @@ func (s *testSuite) TestDMLIndexHintBind(c *C) { | |||
c.Assert(tk.MustUseIndex("delete from t where b = 1 and c > 1", "idx_c(c)"), IsTrue) | |||
} | |||
|
|||
<<<<<<< HEAD |
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.
PTAL @eurekaka
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
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
b4e236b
to
0af3c50
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
/run-all-tests |
cherry-pick #22182 to release-4.0
You can switch your code base to this Pull Request by using git-extras:
# In tidb repo: git pr 22295
After apply modifications, you can push your change to this PR via:
What problem does this PR solve?
Issue Number: close #22178
Problem Summary:
Duplicate bindings for a same original_sql.
What is changed and how it works?
What's Changed:
Call
CreateBindRecord
instead ofAddBindRecord
inCaptureBaselines
.How it Works:
AddBindRecord
only checks the duplicate in binding cache, whileCreateBindRecord
would remove duplicate bindings inmysql.bind_info
unconditionally.Related changes
Check List
Tests
Side effects
N/A
Release note