Hello,
I've been working on a new script that will access the MySQL database. In testing this script, I was worried about the complexity of some of my queries, so I naturally went to the MySQL client and ran them with "explain". It appears that I do not have permission to do so. Is this intended? Is something wrong?
*EXPLAIN/SHOW can not be issued; lacking privileges for underlying table*
See session snippet below:
grphack@willow:~$ mysql -h enwiki-p.userdb.toolserver.org enwiki_p Server version: 5.1.66 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> explain select * from revision; ERROR 1345 (HY000): EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
Thanks! -Aaron
On Fri, Jan 4, 2013 at 1:55 PM, Aaron Halfaker aaron.halfaker@gmail.com wrote:
Hello,
I've been working on a new script that will access the MySQL database. In testing this script, I was worried about the complexity of some of my queries, so I naturally went to the MySQL client and ran them with "explain". It appears that I do not have permission to do so. Is this intended? Is something wrong?
EXPLAIN can leak information from underlying tables, so if you dont have permissions for those tables the explain will fail with the error message provided.
This is a big problem. I don't know if my queries are using indexes or not.
-Aaron
On Fri, Jan 4, 2013 at 2:05 PM, OQ overlordq@gmail.com wrote:
On Fri, Jan 4, 2013 at 1:55 PM, Aaron Halfaker aaron.halfaker@gmail.com wrote:
Hello,
I've been working on a new script that will access the MySQL database.
In
testing this script, I was worried about the complexity of some of my queries, so I naturally went to the MySQL client and ran them with "explain". It appears that I do not have permission to do so. Is this intended? Is something wrong?
EXPLAIN can leak information from underlying tables, so if you dont have permissions for those tables the explain will fail with the error message provided.
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/toolserver-l Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
On 04/01/13 21:05, OQ wrote:
On Fri, Jan 4, 2013 at 1:55 PM, Aaron Halfaker aaron.halfaker@gmail.com wrote:
Hello,
I've been working on a new script that will access the MySQL database. In testing this script, I was worried about the complexity of some of my queries, so I naturally went to the MySQL client and ran them with "explain". It appears that I do not have permission to do so. Is this intended? Is something wrong?
EXPLAIN can leak information from underlying tables, so if you dont have permissions for those tables the explain will fail with the error message provided.
It was possible until the last mysql update. And yes, being able to EXPLAIN queries is *very* useful. Otherwise the already-a-guessing-game of making efficient queries is even harder.
I don't think an EXPLAIN can leak information not already available to us by querying the view (possibly multiple times).
toolserver-l@lists.wikimedia.org