Skip to content

Commit

Permalink
sql: correctly set inner plan for leafTxn when resuming flow for portal
Browse files Browse the repository at this point in the history
When resuming a portal, we always reset the planner. However we still need the
planner to respect the outer txn's situation, as we did in #98120.

Release note: None
  • Loading branch information
ZhouXing19 committed Apr 7, 2023
1 parent aa6cd36 commit 3d20ce5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/sql/planner.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,11 @@ func (p *planner) resumeFlowForPausablePortal(recv *DistSQLReceiver) error {
}
recv.discardRows = p.instrumentation.ShouldDiscardRows()
recv.outputTypes = p.pausablePortal.pauseInfo.resumableFlow.outputTypes
p.pausablePortal.pauseInfo.resumableFlow.flow.Resume(recv)
flow := p.pausablePortal.pauseInfo.resumableFlow.flow
finishedSetupFn, cleanup := getFinishedSetupFn(p)
finishedSetupFn(flow)
defer cleanup()
flow.Resume(recv)
return recv.commErr
}

Expand Down

0 comments on commit 3d20ce5

Please sign in to comment.