From e04e9b8f1d58072a17347ec33650ce3b68a51251 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Wed, 6 Mar 2024 20:20:22 +0800 Subject: [PATCH] update --- pkg/bindinfo/binding_cache.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/bindinfo/binding_cache.go b/pkg/bindinfo/binding_cache.go index 89ef6f62f139b..19f818aa9ce3c 100644 --- a/pkg/bindinfo/binding_cache.go +++ b/pkg/bindinfo/binding_cache.go @@ -79,6 +79,9 @@ func (fbc *fuzzyBindingCache) FuzzyMatchingBinding(sctx sessionctx.Context, fuzz } fbc.loadFromStore(missingSQLDigest) // loadFromStore's SetBinding has a Mutex inside, so it's safe to call it without lock matchedBinding, isMatched, _ = fbc.getFromMemory(sctx, fuzzyDigest, tableNames) + if !isMatched { + sctx.GetSessionVars().StmtCtx.AppendWarning(errors.New("failed to load bindings, optimization process without bindings")) + } return }