Skip to content

Commit

Permalink
Merge pull request cockroachdb#128784 from cockroachdb/blathers/backp…
Browse files Browse the repository at this point in the history
…ort-release-24.2-128675

release-24.2: sql: SHOW CLUSTER SETTING FOR TENANT returns NULL for renamed cluster setting
  • Loading branch information
rafiss authored Aug 20, 2024
2 parents 8863a71 + 69189ae commit 343453c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion pkg/sql/logictest/testdata/logic_test/cluster_settings
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ SHOW CLUSTER SETTING diagnostics.reporting.enabled
----
true

user root
user root

statement ok
REVOKE SYSTEM MODIFYSQLCLUSTERSETTING FROM testuser
Expand Down Expand Up @@ -435,3 +435,16 @@ query T noticetrace
ALTER TENANT ALL RESET CLUSTER SETTING sql.trace.log_statement_execute
----
NOTICE: "sql.trace.log_statement_execute" is now an alias for "sql.log.all_statements.enabled", the preferred setting name


subtest show_renamed_setting_for_tenant

skipif config 3node-tenant-default-configs
statement ok
ALTER TENANT "cluster-10" SET CLUSTER SETTING sql.explain_analyze.include_ru_estimation.enabled=false;

skipif config 3node-tenant-default-configs
query B
SHOW CLUSTER SETTING sql.explain_analyze.include_ru_estimation.enabled FOR TENANT "cluster-10"
----
false
2 changes: 1 addition & 1 deletion pkg/sql/tenant_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ FROM
ctx, "get-tenant-setting-value", p.txn,
sessiondata.NoSessionDataOverride,
lookupEncodedTenantSetting,
setting.Name(), rec.ID)
setting.InternalKey(), rec.ID)
if err != nil {
return false, "", err
}
Expand Down

0 comments on commit 343453c

Please sign in to comment.