user6367252
user6367252

Reputation:

Does 'grant select' without 'grant option' revoke previous 'grant option'?

Let's take an example:

us1: GRANT SELECT ON table to us2 WITH GRANT OPTION;
us2: GRANT SELECT ON table to us3 WITH GRANT OPTION;
us3: GRANT SELECT ON table to us2;

Does us2 have the GRANT option now? I couldn't find any info about that if GRANT revokes previous permissions.

Upvotes: 2

Views: 117

Answers (1)

Norbert
Norbert

Reputation: 6084

All permission grants are positive edits, so it does not revoke any grants at all. If it would not work like that, granting rights would become nearly impossible:

For example:

 GRANT SELECT ON db.* TO user1

And then

 GRANT ALL ON db.abc TO user1

Would then only result in the last grant, making it impossible for you to build elaborate grants.

Upvotes: 2

Related Questions