Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-23.1: sql: fix exec+audit logs for BEGIN, COMMIT, SET stmts #108411

Merged
merged 3 commits into from Aug 9, 2023

Conversation

rafiss
Copy link
Collaborator

@rafiss rafiss commented Aug 9, 2023

Backport 3/3 commits from #107912.

/cc @cockroachdb/release


Epic: None
Release justification: bug fix
Release note (bug fix): Fixed a bug where BEGIN, COMMIT, SET, ROLLBACK, and SAVEPOINT statements would not be written to the execution or audit logs.

@rafiss rafiss requested a review from j82w August 9, 2023 04:06
@rafiss rafiss requested review from a team as code owners August 9, 2023 04:06
@rafiss rafiss requested a review from mgartner August 9, 2023 04:06
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @j82w and @mgartner)

@yuzefovich
Copy link
Member

FYI there is a failure on master with high vmodule due to this #108421.

@yuzefovich yuzefovich changed the title sql: fix exec+audit logs for BEGIN, COMMIT, SET stmts release-23.1: sql: fix exec+audit logs for BEGIN, COMMIT, SET stmts Aug 9, 2023
Release note (bug fix): Fixed a bug where BEGIN, COMMIT, SET, ROLLBACK,
and SAVEPOINT statements would not be written to the execution or audit
logs.
There was no need for this to live in the sessioninit cache. It just
caused an extra dependency.

Release note: None
We don't need this field, since it's only used in one conditional, and
that check can be replaced by a direct check of the txn associated with
the planner.

Release note: None
Copy link
Collaborator Author

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @j82w and @mgartner)


pkg/sql/conn_executor_exec.go line 906 at r6 (raw file):

			// logged correctly.
			p.stmt = stmt
			p.extendedEvalCtx.Placeholders = oldPlaceholders

this incorporates the fix from #108461

@rafiss rafiss merged commit 5ef537b into cockroachdb:release-23.1 Aug 9, 2023
6 checks passed
@rafiss rafiss deleted the backport23.1-107912 branch August 9, 2023 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants