Skip to content

sql: don't use SetWithPlanner for password_encryption#123793

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:set-with-planner
May 8, 2024
Merged

sql: don't use SetWithPlanner for password_encryption#123793
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:set-with-planner

Conversation

@yuzefovich
Copy link
Copy Markdown
Member

Using the default Set method is sufficient.

Epic: None

Release note: None

@yuzefovich yuzefovich requested a review from rafiss May 8, 2024 01:04
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented May 8, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@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.

i think this revealed a bug elsewhere. we probably should apply this diff:

diff --git a/pkg/sql/pg_catalog.go b/pkg/sql/pg_catalog.go
index 19d8eeac958..aca1407eaa6 100644
--- a/pkg/sql/pg_catalog.go
+++ b/pkg/sql/pg_catalog.go
@@ -3018,7 +3018,7 @@ https://www.postgresql.org/docs/9.5/catalog-pg-settings.html`,
 			valueDatum := tree.NewDString(value)
 			var bootDatum tree.Datum = tree.DNull
 			var resetDatum tree.Datum = tree.DNull
-			if gen.Set == nil && gen.RuntimeSet == nil {
+			if gen.Set == nil && gen.RuntimeSet == nil && gen.SetWithPlanner == nil {
 				// RESET/SET will leave the variable unchanged. Announce the
 				// current value as boot/reset value.
 				bootDatum = valueDatum

and to make your PR work, you might need to set a GlobalDefault for this variable

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

Using the default Set method is sufficient.

Release note: None
@yuzefovich yuzefovich requested a review from a team as a code owner May 8, 2024 16:15
Copy link
Copy Markdown
Member Author

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

Thanks, done.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

@yuzefovich
Copy link
Copy Markdown
Member Author

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 8, 2024

@craig craig bot merged commit ccfb104 into cockroachdb:master May 8, 2024
@yuzefovich yuzefovich deleted the set-with-planner branch May 8, 2024 21:42
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.

3 participants