Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
88332: builtins: put check_consistency on DistsqlBlocklist r=erikgrinaker a=tbg

Fixes cockroachdb#88222.

Release note: None


Co-authored-by: Tobias Grieger <tobias.b.grieger@gmail.com>
  • Loading branch information
craig[bot] and tbg committed Sep 26, 2022
2 parents 0961abd + 77091fe commit db9f943
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 db9f943

Please sign in to comment.