Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
qw4990 committed May 23, 2024
1 parent 274c724 commit 3df49d5
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pkg/planner/core/plan_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ package core

import (
"context"
"fmt"
"reflect"

"github.com/pingcap/errors"
"github.com/pingcap/tidb/pkg/bindinfo"
"github.com/pingcap/tidb/pkg/domain"
Expand Down Expand Up @@ -256,24 +253,24 @@ func getCachedPlan(sctx sessionctx.Context, isNonPrepared bool, cacheKey kvcache
switch x := cachedVal.Plan.(type) {
case base.PhysicalPlan:
if _, err := x.Clone(); err != nil {
panic(fmt.Sprintf("%v %v %v", reflect.TypeOf(x), x, err))
//panic(fmt.Sprintf("%v %v %v", reflect.TypeOf(x), x, err))
}
case *Update:
if x.SelectPlan != nil {
if _, err := x.SelectPlan.Clone(); err != nil {
panic(fmt.Sprintf("%v %v %v", reflect.TypeOf(x), x, err))
//panic(fmt.Sprintf("%v %v %v", reflect.TypeOf(x), x, err))
}
}
case *Insert:
if x.SelectPlan != nil {
if _, err := x.SelectPlan.Clone(); err != nil {
panic(fmt.Sprintf("%v %v %v", reflect.TypeOf(x), x, err))
//panic(fmt.Sprintf("%v %v %v", reflect.TypeOf(x), x, err))
}
}
case *Delete:
if x.SelectPlan != nil {
if _, err := x.SelectPlan.Clone(); err != nil {
panic(fmt.Sprintf("%v %v %v", reflect.TypeOf(x), x, err))
//panic(fmt.Sprintf("%v %v %v", reflect.TypeOf(x), x, err))
}
}
}
Expand Down

0 comments on commit 3df49d5

Please sign in to comment.