diff --git a/ChangeLog b/ChangeLog index 85c006f92..747b54606 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ $Source$ 2006-02-17 Marc Delisle * lang/*, db_details_structure.php: bug #1431352, no %d in strViewMaxExactCount + * db_details_structure.php: bug #1431340, rowcount for views and + unneeded $strViewMaxExactCount 2006-02-17 Sebastian Mendel * docs.css, Documentation.html, translators.html: diff --git a/db_details_structure.php b/db_details_structure.php index 26f7e4be3..cebef727a 100644 --- a/db_details_structure.php +++ b/db_details_structure.php @@ -171,7 +171,7 @@ $row_count = 0; $hidden_fields = array(); $odd_row = true; -$at_least_one_view = false; +$at_least_one_view_exceeds_max_count = false; foreach ($tables as $keyname => $each_table) { if ($each_table['TABLE_ROWS'] === null || $each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) { @@ -183,9 +183,6 @@ foreach ($tables as $keyname => $each_table) { // MySQL < 5.0.13 returns "view", >= 5.0.13 returns "VIEW" $table_is_view = ($each_table['TABLE_TYPE'] === 'VIEW' || $each_table['TABLE_TYPE'] === 'SYSTEM VIEW'); - if ($table_is_view) { - $at_least_one_view = true; - } $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']])) ? htmlspecialchars($tooltip_aliasname[$each_table['TABLE_NAME']]) @@ -343,12 +340,23 @@ foreach ($tables as $keyname => $each_table) { - = $cfg['MaxExactCount'] ? '1' : ''); ?> + // there is a null value in the ENGINE + // - when the table needs to be repaired, or + // - when it's a view + // so ensure that we'll display "in use" below for a table + // that needs to be repaired + + if (isset($each_table['TABLE_ROWS']) && ($each_table['ENGINE'] != null || $table_is_view)) { + if ($table_is_view && $each_table['TABLE_ROWS'] >= $cfg['MaxExactCount']) { + $at_least_one_view_exceeds_max_count = true; + $show_superscript = '1'; + } else { + $show_superscript = ''; + } + ?> + 1)) { ?> - + @@ -471,7 +479,7 @@ echo '