On 4/21/06, Nico Sabbi <[EMAIL PROTECTED]> wrote:

> Is this behaviour due to a bug or maybe my mysql tables are messed up?

I'm not sure if we can call it a bug. But spending 8 seconds (and
using 100% CPU) for a simple SHOW DATABASES query is a bit too much,
and should be fixed.

mysqld first reads directories name from its data directory, then
loops over all names and does the following check:

if (thd->master_access & (DB_ACLS | SHOW_DB_ACL) ||
        acl_get(thd->host, thd->ip, thd->priv_user, file_name,0) ||
        (grant_option && !check_grant_db(thd, file_name)))

If a query runs faster when user has access to more DBs, then the
problem most likely lies within check_grant_db function.

But it all needs more careful investigation.

--
Alexey Polyakov

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to