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: ensure schema only has valid privileges after reparent database is done #65722

Merged

Conversation

RichardJCai
Copy link
Contributor

@RichardJCai RichardJCai commented May 26, 2021

sql: ensure schema only has valid privileges after reparent database is done

Release note (bug fix): Previously, ALTER DATABASE ... CONVERT TO SCHEMA
could potentially leave the schema with invalid privileges thus causing the
privilege descriptor to be invalid.

Fixes #65697

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@RichardJCai RichardJCai force-pushed the reparent_database_privilege_fix_05262021 branch 2 times, most recently from 9fd977f to b711e87 Compare May 26, 2021 22:08
@RichardJCai RichardJCai requested review from ajwerner and a team May 26, 2021 22:08
@RichardJCai RichardJCai changed the title wip: sql: ensure schema only has valid privileges after reparent database is done sql: ensure schema only has valid privileges after reparent database is done May 26, 2021
Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @RichardJCai)

…is done

Release note (bug fix): Previously, ALTER DATABASE ... CONVERT TO SCHEMA
could potentially leave the schema with invalid privileges thus causing the
privilege descriptor to be invalid.
@RichardJCai RichardJCai force-pushed the reparent_database_privilege_fix_05262021 branch from b711e87 to 6ee51fc Compare May 27, 2021 18:03
@RichardJCai
Copy link
Contributor Author

TFTR!
bors r=ajwerner

@craig
Copy link
Contributor

craig bot commented May 27, 2021

Build succeeded:

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.

Converting database to schema leaves the schema in an unusable state
3 participants