Hi!
Please, don't forget to Cc all technical discussions to internals@stripped
On May 10, Sergey Kudriavtsev wrote:
> 2008/5/10 Sergei Golubchik <serg@stripped>:
>
> > > 1.b) Add new table mysql.roles as follows
> > > CREATE TABLE mysql.roles(
> > > `Host` char(60) collate utf8_bin NOT NULL default ",
> > > `User` char(16) collate utf8_bin NOT NULL default ",
> > > `Role` char(16) collate utf8_bin NOT NULL default ",
> > > PRIMARY KEY (`Host`,`User`)
> >
> > eh ? how could you grant two roles to the same user with such a
> > primary key ?
> >
>
> My mistake, should be simple KEY (`Host`,`User`), not PRIMARY KEY
I think you'd better have PRIMARY KEY (Host, User, Role) - to ensure
that no role can be granted twice to the same user.
> > A question:
> >
> > What to do with new reserved names PUBLIC and NONE ? I mean, what if
> > mysql.user table already has users with these names ?
> >
> > There should be some reasonable behaviour in this case. E.g. there's a
> > warning when privilege tables are loaded (sugegsting to rename the
> > user), one can still login as these users, that is accounts work, GRANT
> > TO PUBLIC grants to a role, one would need to write PUBLIC@'%' to grant
> > to a user - that's the most backward-compatible behaviour I could think
> > of, the incompatibility is minor.
> >
>
> PUBLIC? As I remember from WL#988, it was decided not to add this keyword.
> Did you mean DEFAULT?
No, I mean PUBLIC. In the standard you can write
GRANT privilege ON ... TO PUBLIC
which means "to all users".
Are you saying you are not going to implement this feature ?
(which is ok, if you don't want to - it'll need to be implemented
separately then)
Regards / Mit vielen Grüssen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Häring