sql: reject ALTER CLUSTER ... WITH (WAIT ...) on unmanaged clusters#37362
Merged
Conversation
Problem:
`ALTER CLUSTER c SET (MANAGED = false) WITH (WAIT FOR '...')` and the
`WAIT UNTIL READY` variant were silently accepted: the WAIT options were
parsed and then dropped without effect, contrary to the error other
managed-only options produce ("not supported for unmanaged clusters").
Solution:
Validate the raw `with_options` in the unmanaged arm instead of the
typed strategy. Any non-empty `WITH` clause on an unmanaged target now
errors consistently with the sibling option checks.
Testing:
Added four cases to `test/sqllogictest/managed_cluster.slt` covering
`WAIT FOR` and `WAIT UNTIL READY` against (a) an already-unmanaged
cluster and (b) a managed->unmanaged transition
Fixes SQL-217.
SangJunBak
approved these changes
Jun 30, 2026
SangJunBak
left a comment
Contributor
There was a problem hiding this comment.
Although this is a bit restrictive in case we add WITH options for unmanaged clusters, I think we can easily fix it when it actually becomes a problem.
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.
Problem:
ALTER CLUSTER c SET (MANAGED = false) WITH (WAIT FOR '...')and theWAIT UNTIL READYvariant were silently accepted: the WAIT options were parsed and then dropped without effect, contrary to the error other managed-only options produce ("not supported for unmanaged clusters").Solution:
Validate the raw
with_optionsin the unmanaged arm instead of the typed strategy. Any non-emptyWITHclause on an unmanaged target now errors consistently with the sibling option checks.Testing:
Added four cases to
test/sqllogictest/managed_cluster.sltcoveringWAIT FORandWAIT UNTIL READYagainst (a) an already-unmanaged cluster and (b) a managed->unmanaged transitionFixes SQL-217.