-
Georgi Kodinov authored
in certain cases GRANT OPTION is both a separate option and part of the internal mask used when parsing an ALL PRIVILEGES privilege. Thus when parsing GRANT ALL PRIVILEGES/REVOKE ALL PRIVILEGES we need to remove the GRANT OPTION from the mask. And we also need a special command to deal with REVOKE ALL PRIVILEGES,GRANT OPTION because of that removal. However, the fact that a crefully crafted list of individual privileges can produce the same list as ALL PRIVILEGES, GRANT OPTION was omitted and thus the special command wasn't used in this case, causing a removal of the GRANT OPTION mask in REVOKE. Fixed by checking for this special case in parsing REVOKE and using the proper internal command for it. Also noted that the syntax errors in the parser for constructs like REVOKE ... FROM ... IDENTIFIED ... were pratcially turned off and fixed that by setting the right SQL command early in the parser so that the additional checks can operate. Added proper error generation as these checks were rotting away being turned off for some time. Test cases added. Fixed test cases that were expecting wrong errors for REVOKE .. FROM .. IDENTIFIED ...
Georgi Kodinov authoredin certain cases GRANT OPTION is both a separate option and part of the internal mask used when parsing an ALL PRIVILEGES privilege. Thus when parsing GRANT ALL PRIVILEGES/REVOKE ALL PRIVILEGES we need to remove the GRANT OPTION from the mask. And we also need a special command to deal with REVOKE ALL PRIVILEGES,GRANT OPTION because of that removal. However, the fact that a crefully crafted list of individual privileges can produce the same list as ALL PRIVILEGES, GRANT OPTION was omitted and thus the special command wasn't used in this case, causing a removal of the GRANT OPTION mask in REVOKE. Fixed by checking for this special case in parsing REVOKE and using the proper internal command for it. Also noted that the syntax errors in the parser for constructs like REVOKE ... FROM ... IDENTIFIED ... were pratcially turned off and fixed that by setting the right SQL command early in the parser so that the additional checks can operate. Added proper error generation as these checks were rotting away being turned off for some time. Test cases added. Fixed test cases that were expecting wrong errors for REVOKE .. FROM .. IDENTIFIED ...
Loading