From 1cc20a2c173e2b9054f2db05cf79b057c5dc4bb0 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 23 Nov 2021 16:29:49 +0800 Subject: [PATCH] fixup --- planner/optimize.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/planner/optimize.go b/planner/optimize.go index c29663bf08e6e..800e322080061 100644 --- a/planner/optimize.go +++ b/planner/optimize.go @@ -99,19 +99,6 @@ func GetExecuteForUpdateReadIS(node ast.Node, sctx sessionctx.Context) infoschem return nil } -func matchSQLBinding(stmtNode ast.StmtNode, sctx sessionctx.Context) (bindRecord *bindinfo.BindRecord, scope string, matched bool) { - useBinding := sctx.GetSessionVars().UsePlanBaselines - if !useBinding || stmtNode == nil { - return nil, "", false - } - var err error - bindRecord, scope, err = getBindRecord(sctx, stmtNode) - if err != nil || bindRecord == nil || len(bindRecord.Bindings) == 0 { - return nil, "", false - } - return bindRecord, scope, true -} - // Optimize does optimization and creates a Plan. // The node must be prepared first. func Optimize(ctx context.Context, sctx sessionctx.Context, node ast.Node, is infoschema.InfoSchema) (plannercore.Plan, types.NameSlice, error) {