added error reporting if dblist retrieval from information_schema fails

This commit is contained in:
Sebastian Mendel
2006-09-20 14:58:41 +00:00
parent ce8e5b220a
commit 3b526ced4f
2 changed files with 11 additions and 4 deletions

View File

@@ -5,13 +5,15 @@ phpMyAdmin - ChangeLog
$Id$
$Source$
2006-08-11 Sebastian Mendel <cybot_tm@users.sourceforge.net>
2006-09-20 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* export.php, left.php, libraries\Table.class.php, libraries\common.lib.php,
libraries\database_interface.lib.php, libraries\dbi\mysql.dbi.lib.php,
libraries\dbi\mysqli.dbi.lib.php, libraries\sql_query_form.lib.php,
querywindow.php, server_databases.php, server_export.php,
tbl_properties_operations.php:
replaced $dblist with new PMA_List_Database class
* libraries\database_interface.lib.php: added error reporting if dblist
retrieval from information_schema fails
2006-09-19 Marc Delisle <lem9@users.sourceforge.net>
* Documentation.html, libraries/footer.inc.php,

View File

@@ -455,7 +455,12 @@ function PMA_DBI_get_databases_full($database = null, $force_stats = false,
GROUP BY `information_schema`.`SCHEMATA`.`SCHEMA_NAME`
ORDER BY ' . PMA_backquote($sort_by) . ' ' . $sort_order
. $limit;
$databases = PMA_DBI_fetch_result( $sql, 'SCHEMA_NAME', null, $link );
$databases = PMA_DBI_fetch_result($sql, 'SCHEMA_NAME', null, $link);
$mysql_error = PMA_DBI_getError($link);
if (! count($databases) && $GLOBALS['errno']) {
PMA_mysqlDie($mysql_error, $sql);
}
// display only databases also in official database list
// f.e. to apply hide_db and only_db
@@ -464,9 +469,9 @@ function PMA_DBI_get_databases_full($database = null, $force_stats = false,
foreach ($drops as $drop) {
unset($databases[$drop]);
}
unset($drop);
}
unset($sql_where_schema, $sql);
unset($sql_where_schema, $sql, $drops);
} else {
foreach ($GLOBALS['PMA_List_Database']->items as $database_name) {
// MySQL forward compatibility