bug #1431340
This commit is contained in:
@@ -8,6 +8,8 @@ $Source$
|
|||||||
2006-02-17 Marc Delisle <lem9@users.sourceforge.net>
|
2006-02-17 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* lang/*, db_details_structure.php:
|
* lang/*, db_details_structure.php:
|
||||||
bug #1431352, no %d in strViewMaxExactCount
|
bug #1431352, no %d in strViewMaxExactCount
|
||||||
|
* db_details_structure.php: bug #1431340, rowcount for views and
|
||||||
|
unneeded $strViewMaxExactCount
|
||||||
|
|
||||||
2006-02-17 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
2006-02-17 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||||
* docs.css, Documentation.html, translators.html:
|
* docs.css, Documentation.html, translators.html:
|
||||||
|
@@ -171,7 +171,7 @@ $row_count = 0;
|
|||||||
|
|
||||||
$hidden_fields = array();
|
$hidden_fields = array();
|
||||||
$odd_row = true;
|
$odd_row = true;
|
||||||
$at_least_one_view = false;
|
$at_least_one_view_exceeds_max_count = false;
|
||||||
|
|
||||||
foreach ($tables as $keyname => $each_table) {
|
foreach ($tables as $keyname => $each_table) {
|
||||||
if ($each_table['TABLE_ROWS'] === null || $each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
|
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"
|
// MySQL < 5.0.13 returns "view", >= 5.0.13 returns "VIEW"
|
||||||
$table_is_view = ($each_table['TABLE_TYPE'] === 'VIEW'
|
$table_is_view = ($each_table['TABLE_TYPE'] === 'VIEW'
|
||||||
|| $each_table['TABLE_TYPE'] === 'SYSTEM 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']]))
|
$alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']]))
|
||||||
? htmlspecialchars($tooltip_aliasname[$each_table['TABLE_NAME']])
|
? htmlspecialchars($tooltip_aliasname[$each_table['TABLE_NAME']])
|
||||||
@@ -343,12 +340,23 @@ foreach ($tables as $keyname => $each_table) {
|
|||||||
<?php echo $titles['Drop']; ?></a></td>
|
<?php echo $titles['Drop']; ?></a></td>
|
||||||
<?php } // end if (! $db_is_information_schema)
|
<?php } // end if (! $db_is_information_schema)
|
||||||
|
|
||||||
// there is a null value in the ENGINE when the table needs to be
|
// there is a null value in the ENGINE
|
||||||
// repaired, so this test ensures that we'll display "in use"
|
// - when the table needs to be repaired, or
|
||||||
if (isset($each_table['TABLE_ROWS']) && $each_table['ENGINE'] != null) { ?>
|
// - when it's a view
|
||||||
<td class="value"><?php echo PMA_formatNumber($each_table['TABLE_ROWS'], 0) . ($table_is_view && $each_table['TABLE_ROWS'] >= $cfg['MaxExactCount'] ? '<sup>1</sup>' : ''); ?></td>
|
// 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 = '<sup>1</sup>';
|
||||||
|
} else {
|
||||||
|
$show_superscript = '';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<td class="value"><?php echo PMA_formatNumber($each_table['TABLE_ROWS'], 0) . $show_superscript; ?></td>
|
||||||
<?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
|
<?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
|
||||||
<td nowrap="nowrap"><?php echo $each_table['ENGINE']; ?></td>
|
<td nowrap="nowrap"><?php echo ($table_is_view ? $strView : $each_table['ENGINE']); ?></td>
|
||||||
<?php if (isset($collation)) { ?>
|
<?php if (isset($collation)) { ?>
|
||||||
<td nowrap="nowrap"><?php echo $collation ?></td>
|
<td nowrap="nowrap"><?php echo $collation ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -471,7 +479,7 @@ echo ' <option value="' . $strAnalyzeTable . '" >'
|
|||||||
<?php
|
<?php
|
||||||
// Notice about row count for views
|
// Notice about row count for views
|
||||||
|
|
||||||
if ($at_least_one_view && !$db_is_information_schema) {
|
if ($at_least_one_view_exceeds_max_count && !$db_is_information_schema) {
|
||||||
echo '<div class="notice">' . "\n";
|
echo '<div class="notice">' . "\n";
|
||||||
echo '<sup>1</sup>' . PMA_sanitize(sprintf($strViewMaxExactCount, PMA_formatNumber($cfg['MaxExactCount'], 0), '[a@./Documentation.html#cfg_MaxExactCount@_blank]', '[/a]')) . "\n";
|
echo '<sup>1</sup>' . PMA_sanitize(sprintf($strViewMaxExactCount, PMA_formatNumber($cfg['MaxExactCount'], 0), '[a@./Documentation.html#cfg_MaxExactCount@_blank]', '[/a]')) . "\n";
|
||||||
echo '</div>' . "\n";
|
echo '</div>' . "\n";
|
||||||
|
Reference in New Issue
Block a user