Skip to content

Commit 63ee6a9

Browse files
committed
sql: fix incorrect min timestamp error check
Release note: None
1 parent 1572ff3 commit 63ee6a9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/sql/conn_executor.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3890,8 +3890,6 @@ func (ex *connExecutor) GetPCRReaderTimestamp() hlc.Timestamp {
38903890
return hlc.Timestamp{}
38913891
}
38923892

3893-
var minTSErr = kvpb.NewMinTimestampBoundUnsatisfiableError(hlc.Timestamp{}, hlc.Timestamp{})
3894-
38953893
// resetEvalCtx initializes the fields of evalCtx that can change
38963894
// during a session (i.e. the fields not set by initEvalCtx).
38973895
//
@@ -3930,7 +3928,8 @@ func (ex *connExecutor) resetEvalCtx(evalCtx *extendedEvalContext, txn *kv.Txn,
39303928

39313929
// See resetPlanner for more context on setting the maximum timestamp for
39323930
// AOST read retries.
3933-
if err := ex.state.mu.autoRetryReason; err != nil && errors.Is(err, minTSErr) {
3931+
var minTSErr *kvpb.MinTimestampBoundUnsatisfiableError
3932+
if err := ex.state.mu.autoRetryReason; err != nil && errors.HasType(err, minTSErr) {
39343933
evalCtx.AsOfSystemTime.MaxTimestampBound = ex.extraTxnState.descCollection.GetMaxTimestampBound()
39353934
} else if newTxn {
39363935
evalCtx.AsOfSystemTime = nil

0 commit comments

Comments
 (0)