workaround information_schema problem when a db directory has wrong permissions or ownership

This commit is contained in:
Marc Delisle
2006-06-25 12:42:25 +00:00
parent 1e67f2e153
commit f92275d136
2 changed files with 10 additions and 3 deletions

View File

@@ -297,7 +297,11 @@ function PMA_DBI_get_tables_full($database, $table = false,
$tables = PMA_DBI_fetch_result($sql, array('TABLE_SCHEMA', 'TABLE_NAME'),
null, $link);
unset( $sql_where_table, $sql );
} else {
}
// If permissions are wrong on even one database directory,
// information_schema does not return any table info for any database
// this is why we fall back to SHOW TABLE STATUS even for MySQL >= 50002
if ( PMA_MYSQL_INT_VERSION < 50002 || empty($tables)) {
foreach ( $databases as $each_database ) {
if ( true === $tbl_is_group ) {
$sql = 'SHOW TABLE STATUS FROM '