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

sql: fix bug when using glob which matches nothing #93173

Merged
merged 1 commit into from
Dec 7, 2022

Conversation

ajwerner
Copy link
Contributor

@ajwerner ajwerner commented Dec 6, 2022

Logic in the 22.2 cycle for synthetic privileges erroneously assumed that if no physical tables matched, that it must mean that virtual tables matched. It also assumed that if the first entry in a pattern matched, it applied to all entries. Both of these assumptions were wrong. They lead to ugly panics.

Fixes: #92483

Release note (bug fix): Fixed a bug whereby glob patterns which matched no tables in GRANT or REVOKE statements would return an internal error with a confusing message as opposed to the appropriate "no objects matched" error.

@ajwerner ajwerner requested a review from a team December 6, 2022 22:41
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Logic in the 22.2 cycle for synthetic privileges erroneously assumed that if
no physical tables matched, that it must mean that virtual tables matched. It
also assumed that if the first entry in a pattern matched, it applied to all
entries. Both of these assumptions were wrong. They lead to ugly panics.

Fixes: cockroachdb#92483

Release note (bug fix): Fixed a bug whereby glob patterns which matched no
tables in `GRANT` or `REVOKE` statements would return an internal error with
a confusing message as opposed to the appropriate "no objects matched" error.
@ajwerner ajwerner force-pushed the ajwerner/fix-grant-revoke-bug branch from a799d4e to c8bc75b Compare December 7, 2022 04:27
@ajwerner
Copy link
Contributor Author

ajwerner commented Dec 7, 2022

bors r+

@craig
Copy link
Contributor

craig bot commented Dec 7, 2022

Build succeeded:

@rafiss
Copy link
Collaborator

rafiss commented Mar 23, 2023

blathers backport 22.2

@blathers-crl
Copy link

blathers-crl bot commented Mar 23, 2023

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from c8bc75b to blathers/backport-release-22.2-93173: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 22.2 failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sql: v22.2.0-rc.3: no tables found in changeNonDescriptorBackedPrivilegesNode
4 participants