Skip to content

Commit 5af6250

Browse files
committed
sql: fix incorrect min timestamp error check
This commit fixes a check for a min timestamp error that would always return false. Release note: None
1 parent b66aafa commit 5af6250

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/sql/conn_executor.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3884,6 +3884,8 @@ func (ex *connExecutor) GetPCRReaderTimestamp() hlc.Timestamp {
38843884
return hlc.Timestamp{}
38853885
}
38863886

3887+
var minTSErr = kvpb.NewMinTimestampBoundUnsatisfiableError(hlc.Timestamp{}, hlc.Timestamp{})
3888+
38873889
// resetEvalCtx initializes the fields of evalCtx that can change
38883890
// during a session (i.e. the fields not set by initEvalCtx).
38893891
//
@@ -3922,7 +3924,6 @@ func (ex *connExecutor) resetEvalCtx(evalCtx *extendedEvalContext, txn *kv.Txn,
39223924

39233925
// See resetPlanner for more context on setting the maximum timestamp for
39243926
// AOST read retries.
3925-
var minTSErr *kvpb.MinTimestampBoundUnsatisfiableError
39263927
if err := ex.state.mu.autoRetryReason; err != nil && errors.Is(err, minTSErr) {
39273928
evalCtx.AsOfSystemTime.MaxTimestampBound = ex.extraTxnState.descCollection.GetMaxTimestampBound()
39283929
} else if newTxn {

0 commit comments

Comments
 (0)