release-23.2: sql: Drop Role does not properly check if target user does not exist #134967
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.
Backport 1/1 commits from #134850 on behalf of @Dedej-Bergin.
/cc @cockroachdb/release
Previously when we are a non-admin user and we run drop role if exists on a user that does not exist we would get an error that the user does not exist. This is incosistent with other if exists commands and it does not make sense to get an error since by typing if exists we expect that the user may not exist. These code changes take care of that.
Loom Video Description: https://www.loom.com/share/cd75d692ef3940be9b3fd395dc911f71?sid=ad6b27e1-620f-45b1-be10-9b733408fae5
Fixes: #134538
Release note (bug fix): When you are a non-admin user and you run drop role if exists on a user that does not exist you no longer get an error message.
Release justification: low risk bug fix