dolt icon indicating copy to clipboard operation
dolt copied to clipboard

GRANT wildcard support

Open joel-rieke opened this issue 3 years ago • 3 comments

I am curious if the "GRANT SELECT ON db.table to [email protected].%" where xx are numbers works.

This does work in mysql and would be very useful in go-mysql-server. I have tried it and it doesn't seem to work?

joel-rieke avatar Jul 01 '22 15:07 joel-rieke

Hey @joel-rieke, thanks for the feature request and sorry for the slow response. I don't believe we currently support wildcards in subsections of the hostname, but @Hydrocharged can confirm.

This would be a good feature to support. For future reference, here are the official MySQL docs on wildcard rules in host names.

fulghum avatar Aug 05 '22 23:08 fulghum

Confirming that we do not yet support wildcards within subsections of the hostname. Right now we only support the entire hostname being a wildcard.

Hydrocharged avatar Aug 07 '22 05:08 Hydrocharged

I know this is a little outside mysql standard, however, I forked and added support for cidr blocks so you can add GRANT to a cidr block. Maybe there's a way to support this using standard mysql grant syntax, but it wasn't that clear to me.

joel-rieke avatar Aug 08 '22 14:08 joel-rieke