Skip to content

Commit

Permalink
backupccl: scrub backup stmt from return errors
Browse files Browse the repository at this point in the history
This patch ensures that no unsanitized uris or secret keys get written to the
jobs table if the backup fails.

Informs #99145

Release note: None
  • Loading branch information
msbutler committed Mar 22, 2023
1 parent d0af5f3 commit f6613a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/ccl/backupccl/schedule_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ func planBackup(
) (sql.PlanHookRowFn, error) {
fn, cols, _, _, err := backupPlanHook(ctx, backupStmt, p)
if err != nil {
return nil, errors.Wrapf(err, "backup eval: %q", tree.AsString(backupStmt))
return nil, errors.Wrapf(err, "failed to evaluate backup stmt")
}
if fn == nil {
return nil, errors.Newf("backup eval: %q", tree.AsString(backupStmt))
return nil, errors.Newf("failed to evaluate backup stmt")
}
if len(cols) != len(jobs.DetachedJobExecutionResultHeader) {
return nil, errors.Newf("unexpected result columns")
Expand Down

0 comments on commit f6613a4

Please sign in to comment.