List:General Discussion« Previous MessageNext Message »
From:Daevid Vincent Date:May 27 2009 12:38am
Subject:GRANT privileges should check for db.table existence
View as plain text  
I'm a little concerned and disappointed that the GRANT command doesn't do
any sort of checking (like a foreign key for example) to verify that the
database and table exist?! 

I get the case of *.* but it seems crazy to me that it would allow foo.bar
when neither a database named 'foo' nor a table named 'bar' even exist?!?!

Clearly the GRANT command is a special case/tool that should have this
ability and throw an error or prevent this. 

If for some reason, this blind insertion is needed for some flexibility say
with temporary tables or something that doesn't exist, then perhaps that
should be a switch/parameter to the command to 'over-ride' the checking and
allow the GRANT (after all, it's just an insert/update/delete statement when
it all boils down to the mysql.user table). In fact, that COULD be the way
these "special case people" get around using GRANT, just insert what they
want directly into mysql.user,host,table, etc. and FLUSH PRIVILEGES.

Thread
GRANT privileges should check for db.table existenceDaevid Vincent27 May
  • Re: GRANT privileges should check for db.table existenceJohan De Meersman27 May