From a1c893f007e91a1ac7c994f0c94387793dc230ec Mon Sep 17 00:00:00 2001 From: Yahor Yuzefovich Date: Fri, 30 Sep 2022 12:20:35 -0700 Subject: [PATCH] sql: correctly reset the planner in the copy shim Previously, we forgot to update the txn of the eval context of the planner. Release note: None --- pkg/sql/copyshim.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/sql/copyshim.go b/pkg/sql/copyshim.go index 659e626fbefa..cc833f9454e1 100644 --- a/pkg/sql/copyshim.go +++ b/pkg/sql/copyshim.go @@ -98,6 +98,7 @@ func RunCopyFrom( p.cancelChecker.Reset(ctx) p.optPlanningCtx.init(p) p.resetPlanner(ctx, txn, stmtTS, p.sessionDataMutatorIterator.sds.Top()) + p.extendedEvalCtx.Context.Txn = txn } p, cleanup := newInternalPlanner("copytest", txn,