Skip to content

Commit

Permalink
builtins: put check_consistency on DistsqlBlocklist
Browse files Browse the repository at this point in the history
Fixes cockroachdb#88222.

Release note: None
  • Loading branch information
tbg committed Sep 26, 2022
1 parent bbcb10f commit 77091fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ true

# Fill a table with consistency check results. This used to panic.
# See: https://github.com/cockroachdb/cockroach/issues/88222
statement error pgcode XX000 no consistency checker configured
statement ok
CREATE TABLE conscheckresult AS (SELECT * FROM crdb_internal.check_consistency(false, '', ''));

# Test crdb_internal commands which execute as root, but
Expand Down
1 change: 1 addition & 0 deletions pkg/sql/planner.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ func internalExtendedEvalCtx(
SQLStatsController: sqlStatsController,
SchemaTelemetryController: schemaTelemetryController,
IndexUsageStatsController: indexUsageStatsController,
ConsistencyChecker: execCfg.ConsistencyChecker,
StmtDiagnosticsRequestInserter: execCfg.StmtDiagnosticsRecorder.InsertRequest,
RangeStatsFetcher: execCfg.RangeStatsFetcher,
},
Expand Down
5 changes: 3 additions & 2 deletions pkg/sql/sem/builtins/generator_builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,9 @@ var generators = map[string]builtinDefinition{

"crdb_internal.check_consistency": makeBuiltin(
tree.FunctionProperties{
Class: tree.GeneratorClass,
Category: builtinconstants.CategorySystemInfo,
Class: tree.GeneratorClass,
Category: builtinconstants.CategorySystemInfo,
DistsqlBlocklist: true, // see #88222
},
makeGeneratorOverload(
tree.ArgTypes{
Expand Down

0 comments on commit 77091fe

Please sign in to comment.