From 948c3a1ddb77929758a54d764172049e46887f8e Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 8 Dec 2005 20:42:07 +0000 Subject: [PATCH] comments added --- libraries/common.lib.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 17521e642..9690da8c1 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -204,8 +204,11 @@ function PMA_safe_db_list($only_db_check, $controllink, $dblist_cnt, $userlink, $dblist = PMA_DBI_get_dblist(); $dblist_cnt = count($dblist); - // did not work so check for available databases in the "mysql" db; - // I don't think we can fall here now... + // PMA_DBI_get_dblist() relies on the ability to run "SHOW DATABASES". + // On servers started with --skip-show-database, this is not possible + // so we have here a fallback method, which relies on the controluser + // being able to access the "mysql" db, as explained in the doc. + if (!$dblist_cnt) { $auth_query = 'SELECT User, Select_priv ' . 'FROM mysql.user '