From 7192ed534cc4dc7dc3cf3a2619878a355e1ba73b Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Wed, 2 Jun 2004 13:31:04 +0000 Subject: [PATCH] bug #964011 --- ChangeLog | 6 +++++- db_details_db_info.php | 7 +++++++ tbl_properties_table_info.php | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 15dce88f6..8c330b8ea 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-06-02 Alexander M. Turek + * db_details_db_info.php, tbl_properties_tbl_info.php: Table type is called + "Engine" in MySQL 4.1.2 (bug #964011). + 2004-05-31 Marc Delisle * header.inc.php: bug #963414, when PropertiesIconic was false, the code did not define the icon variables. Also, remove hardcoded @@ -19,7 +23,7 @@ $Source$ * sql.php: bug #956828, deleting last row gives an error. I could not find a case where we need the line I just removed, which was causing the bug. - * tbl_properties.inc.php: missing statement group {}, was causing + * tbl_properties.inc.php: missing statement group {}, was causing the display of part of the changing amount of columns dialog when editing a field structure diff --git a/db_details_db_info.php b/db_details_db_info.php index 394dced01..d3c0cb1b6 100644 --- a/db_details_db_info.php +++ b/db_details_db_info.php @@ -67,6 +67,10 @@ if ($cfg['SkipLockedTables'] == TRUE) { $sts_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . addslashes($tmp[0]) . '\';'); $sts_tmp = PMA_DBI_fetch_assoc($sts_result); + if (!isset($sts_tmp['Type']) && isset($sts_tmp['Engine'])) { + $sts_tmp['Type'] =& $sts_tmp['Engine']; + } + if (!empty($tbl_group) && $cfg['ShowTooltipAliasTB'] && !preg_match('@' . preg_quote($tbl_group, '@') . '@i', $sts_tmp['Comment'])) { continue; } @@ -90,6 +94,9 @@ if (!isset($sot_ready)) { $db_info_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . $tbl_group_sql . ';', NULL, PMA_DBI_QUERY_STORE); if ($db_info_result != FALSE && PMA_DBI_num_rows($db_info_result) > 0) { while ($sts_tmp = PMA_DBI_fetch_assoc($db_info_result)) { + if (!isset($sts_tmp['Type']) && isset($sts_tmp['Engine'])) { + $sts_tmp['Type'] =& $sts_tmp['Engine']; + } if (!empty($tbl_group) && $cfg['ShowTooltipAliasTB'] && !preg_match('@' . preg_quote($tbl_group, '@') . '@i', $sts_tmp['Comment'])) { continue; } diff --git a/tbl_properties_table_info.php b/tbl_properties_table_info.php index 4943c5a16..dad070f33 100644 --- a/tbl_properties_table_info.php +++ b/tbl_properties_table_info.php @@ -17,6 +17,9 @@ PMA_checkParameters(array('db', 'table')); // The 'show table' statement works correct since 3.23.03 $table_info_result = PMA_DBI_query('SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\';'); $showtable = PMA_DBI_fetch_assoc($table_info_result); +if (!isset($showtable['Type']) && isset($showtable['Engine'])) { + $showtable['Type'] =& $showtable['Engine']; +} $tbl_type = isset($showtable['Type']) ? strtoupper($showtable['Type']) : ''; $tbl_collation = empty($showtable['Collation']) ? '' : $showtable['Collation']; $table_info_num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0);