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,