9 messages in com.mysql.lists.win32Re: mysql and qouting
FromSent OnAttachments
Friedhelm Betz01 Feb 2004 14:47 
Petr Vileta01 Feb 2004 17:10 
Friedhelm Betz02 Feb 2004 01:56 
Andrea Milani02 Feb 2004 02:14 
Friedhelm Betz02 Feb 2004 03:08 
Andrea Milani02 Feb 2004 03:57 
Friedhelm Betz02 Feb 2004 17:15 
Andrea Milani03 Feb 2004 02:25 
Friedhelm Betz04 Feb 2004 01:54 
Subject:Re: mysql and qouting
From:Andrea Milani (andr@tiscali.it)
Date:02/02/2004 03:57:49 AM
List:com.mysql.lists.win32

I know;-), thx. But hey, I was talking about wildcards in database names (sorry if this issue was not clear enough):

Sorry, I didn't look at the SQL statement carefully enough...

GRANT ALL ON `xyz_%`.* TO ... works without escaping the underscore, why? In accordance to the manual the underscrore has a special meanig in databasenames and should be escaped. confused

If you do not escape the underscore, it is interpreted as a wildcard. Hence, the dbname 'xyz_%' should allow the user to access any db whose name starts with xyz, then contains any single character (because of the _) and continues with any number of characters (because of the %). If my interpretation is correct, your grant statement works with a db named "xyz_zyx", but would also work with "xyzazyx".

On Monday 02 February 2004 11:15, Andrea Milani wrote:

The manual says you can use wildcards in database and host names, not in usernames. '_' and '%' have no special meaning in usernames, so they don't need to be escaped.

I know;-), thx. But hey, I was talking about wildcards in database names (sorry if this issue was not clear enough): GRANT ALL ON `xyz_%`.* TO ... works without escaping the underscore, why? In accordance to the manual the underscrore has a special meanig in databasenames and should be escaped. confused

regards Friedhelm Betz