Sorry, I was not using any SELCT in my queries, it's just an error typing the email
I confirm: SHOW GRANTS FOR CURRENT_USER(); does not work, while that query is exaclty what you expect to do reading mysql manual. On Tue, 23 Dec 2003 12:47:11 +0200 Egor Egorov <[EMAIL PROTECTED]> wrote: > Plinio Conti <[EMAIL PROTECTED]> wrote: > > > > The manual page at http://www.mysql.com/doc/en/SHOW_GRANTS.html > > says: > > > > "To list grants for the current session one may use CURRENT_USER() function" > > > > But if I run > > "SELECT SHOW GRANTS FOR CURRENT_USER(); > > > > I get syntax error (Error 1064). > > > > While if I run directly > > "SELECT SHOW GRANTS FOR [EMAIL PROTECTED];" > > > > It works. Did you guess why? > > Look at the example of usage SHOW GRANTS in the manual: > > mysql> SHOW GRANTS FOR [EMAIL PROTECTED]; > > There is no SELECT word in the query. > > > > > On Mon, 22 Dec 2003 15:37:43 +0200 > > Egor Egorov <[EMAIL PROTECTED]> wrote: > > > >> Plinio Conti <[EMAIL PROTECTED]> wrote: > >> > > >> > Is there a way to query the privileges of current user if he hasn't the rights > >> > to read the mysql system tables (user, db, hosts, etc..) > >> > > >> > I mean, I CAN'T give a standard user the chance of read "system tables"! > >> > But my client app wants to know if the current user has (for example) the > >> > rights to write on table xxx, because if not, I don't want to let him try and > >> > fail, I want to disable the updates in advance. > >> > > >> > >> Take a look at SHOW GRANTS command: > >> http://www.mysql.com/doc/en/SHOW_GRANTS.html > >> > > > > > > > > > > -- > For technical support contracts, goto https://order.mysql.com/?ref=ensita > This email is sponsored by Ensita.net http://www.ensita.net/ > __ ___ ___ ____ __ > / |/ /_ __/ __/ __ \/ / Egor Egorov > / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] > /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net > <___/ www.mysql.com > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]