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

builtins: put check_consistency on DistsqlBlocklist #88332

Merged
merged 1 commit into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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