Delete enable hint database param#166118
Closed
michae2 wants to merge 2 commits intocockroachdb:masterfrom
Closed
Conversation
Contributor
|
Merging to
|
Member
a9c00cd to
5004b5c
Compare
Add an `optDatabase` parameter to `DeleteHintFromDB`, `SetHintEnabledInDB`, and their corresponding `Planner` interface methods (`DeleteStatementHint`, `SetStatementHintEnabled`). When non-empty, the database is used as an additional WHERE filter. `DeleteHintFromDB` now also returns the database of each deleted row so callers can include it in telemetry events. It also gains a `*cluster.Settings` parameter and a version check for the `database` column, consistent with the other hint table functions. Update the `DeleteRewriteInlineHints` and `DeleteSessionVariableHint` proto messages to add a `database` field and reorder fields to match their create-event counterparts (`RewriteInlineHints`, `SetSessionVariableHint`). Also add the `DonorSQL` customname to `DeleteRewriteInlineHints.donor_sql` for consistency. Extract existing delete-hint overloads from inline definitions to named package-level variables for consistency with the enable-hint overloads. All existing callers pass empty string for the new parameter, so this commit is a no-op. Release note: None Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
Add new overloads that accept a `database` parameter: - `crdb_delete_statement_hints(statement_fingerprint, database)` — deletes hints matching both the fingerprint and database. - `crdb_enable_statement_hints(enabled, statement_fingerprint, database)` — enables/disables hints matching both the fingerprint and database. These complement the existing database overloads on `crdb_rewrite_inline_hints` and `crdb_set_session_variable_hint`. Release note (sql change): Added database-scoped overloads for crdb_delete_statement_hints and crdb_enable_statement_hints builtins, allowing hints to be deleted or enabled/disabled by fingerprint and database. Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
5004b5c to
147b05c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.