Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei committed Mar 12, 2024
1 parent bcb5de1 commit d8c7622
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/bindinfo/binding_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,16 @@ func (fbc *fuzzyBindingCache) getFromMemory(sctx sessionctx.Context, fuzzyDigest
enableFuzzyBinding := sctx.GetSessionVars().EnableFuzzyBinding
for _, sqlDigest := range fbc.fuzzy2SQLDigests[fuzzyDigest] {
bindings := bindingCache.GetBinding(sqlDigest)
if intest.InTest && sctx.Value(GetBindingReturnNil) != nil {
if GetBindingReturnNilBool.CompareAndSwap(false, true) {
if intest.InTest {
if sctx.Value(GetBindingReturnNil) != nil {
if GetBindingReturnNilBool.CompareAndSwap(false, true) {
bindings = nil
}
}
if sctx.Value(GetBindingReturnNilAlways) != nil {
bindings = nil
}
}
if intest.InTest && sctx.Value(GetBindingReturnNilAlways) != nil {
bindings = nil
}
if bindings != nil {
for _, binding := range bindings {
numWildcards, matched := fuzzyMatchBindingTableName(sctx.GetSessionVars().CurrentDB, tableNames, binding.TableNames)
Expand Down

0 comments on commit d8c7622

Please sign in to comment.