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

@@ -8,6 +8,9 @@ $Source$
2006-06-25 Marc Delisle <lem9@users.sourceforge.net> 2006-06-25 Marc Delisle <lem9@users.sourceforge.net>
* libraries/export/pdf.php, libraries/plugin_interface.lib.php, lang/*: * libraries/export/pdf.php, libraries/plugin_interface.lib.php, lang/*:
bug #1504218: display an explanation for what is a PDF export bug #1504218: display an explanation for what is a PDF export
* libraries/database_interface.lib.php: when a db directory has
wrong permissions/ownership, information_shema does not work
for all databases so we revert to SHOW TABLE STATUS
2006-06-23 Marc Delisle <lem9@users.sourceforge.net> 2006-06-23 Marc Delisle <lem9@users.sourceforge.net>
* libraries/Config.class.php: bug #1501027, possible user/password * libraries/Config.class.php: bug #1501027, possible user/password

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'), $tables = PMA_DBI_fetch_result($sql, array('TABLE_SCHEMA', 'TABLE_NAME'),
null, $link); null, $link);
unset( $sql_where_table, $sql ); 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 ) { foreach ( $databases as $each_database ) {
if ( true === $tbl_is_group ) { if ( true === $tbl_is_group ) {
$sql = 'SHOW TABLE STATUS FROM ' $sql = 'SHOW TABLE STATUS FROM '