diff --git a/ChangeLog b/ChangeLog index b4ddfd02b..2a1da165a 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ $Source$ 2005-08-23 Michal Čihař * libraries/database_interface.lib.php: Abide cfg['Lang'] settings even if using MySQL > 4.1.x (bug #1266626). + * libraries/display_tbl.lib.php: Do not get TABLES as table name, it's + used on some queries by MySQL 5.0.x (bug #1266623). 2005-08-22 Michal Čihař * error.php, libraries/common.lib.php, libraries/sanitizing.lib.php: diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 507c44a84..d6cace586 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -1778,7 +1778,14 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) // 2.3 Displays the navigation bars if (!isset($table) || strlen(trim($table)) == 0) { - $table = $fields_meta[0]->table; + /* TABLES is returned as table name for queries like SHOW TABLE + * STATUS FROM phpmyadmin on MySQL 5.0.x, see bug #1266623 for + * more details. --Nijel */ + if ($fields_meta[0]->table == 'TABLES') { + $table = ''; + } else { + $table = $fields_meta[0]->table; + } } if ($is_display['nav_bar'] == '1') { PMA_displayTableNavigation($pos_next, $pos_prev, $encoded_sql_query);