File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change
1
+ 7.4.1
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ go_library(
37
37
"//util/stmtsummary" ,
38
38
"//util/table-filter" ,
39
39
"//util/timeutil" ,
40
+ "@com_github_pingcap_errors//:errors" ,
40
41
"@org_golang_x_exp//maps" ,
41
42
"@org_uber_go_zap//:zap" ,
42
43
],
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import (
18
18
"time"
19
19
"unsafe"
20
20
21
+ "github.com/pingcap/errors"
21
22
"github.com/pingcap/tidb/metrics"
22
23
"github.com/pingcap/tidb/parser"
23
24
"github.com/pingcap/tidb/sessionctx"
@@ -161,7 +162,13 @@ func (br *BindRecord) FindBinding(hint string) *Binding {
161
162
162
163
// prepareHints builds ID and Hint for BindRecord. If sctx is not nil, we check if
163
164
// the BindSQL is still valid.
164
- func (br * BindRecord ) prepareHints (sctx sessionctx.Context ) error {
165
+ func (br * BindRecord ) prepareHints (sctx sessionctx.Context ) (rerr error ) {
166
+ defer func () {
167
+ if r := recover (); r != nil {
168
+ rerr = errors .Errorf ("panic when preparing hints for binding panic: %v" , r )
169
+ }
170
+ }()
171
+
165
172
p := parser .New ()
166
173
for i , bind := range br .Bindings {
167
174
if (bind .Hint != nil && bind .ID != "" ) || bind .Status == deleted {
You can’t perform that action at this time.
0 commit comments