Skip to content

Commit 34eafdf

Browse files
committed
sql: check for resultWriter error in runPlanInsidePlan
In cockroachdb#104553, we modified `runPlanInsidePlan` to plan and run checks after planning and running the inside plan. Although we check for comm errors after the initial call to `PlanAndRun` to see if we should exit early, we neglected to also check the result writer for errors. Since not all result writer errors may be copied into the comm errors, we fix that here. Epic: None Informs: cockroachdb#87289 Release note: None
1 parent 54c3e26 commit 34eafdf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/sql/apply_join.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,9 @@ func runPlanInsidePlan(
347347
if recv.commErr != nil {
348348
return recv.commErr
349349
}
350+
if resultWriter.Err() != nil {
351+
return resultWriter.Err()
352+
}
350353

351354
evalCtxFactory2 := func(usedConcurrently bool) *extendedEvalContext {
352355
return evalCtxFactory()

0 commit comments

Comments
 (0)