patch #1957998 [display] No tilde for InnoDB row counter when we know it for sure; also, fix in trunk a problem where "In use" was always displayed for views
This commit is contained in:
@@ -67,6 +67,8 @@ danbarry
|
||||
thanks to Norman Hippert
|
||||
- bug #1939031 Auto_Increment selected for TimeStamp by Default
|
||||
- bug #1910621 [display] part 2: do not display a BINARY content as text
|
||||
- patch #1957998 [display] No tilde for InnoDB row counter when we know
|
||||
it for sure, thanks to Vladyslav Bakayev - dandy76
|
||||
|
||||
2.11.6.0 (2008-04-29)
|
||||
- bug #1903724 [interface] Displaying of very large queries in error message
|
||||
|
@@ -195,16 +195,13 @@ foreach ($tables as $keyname => $each_table) {
|
||||
// statistics whatever is the table type
|
||||
|
||||
$table_is_view = false;
|
||||
|
||||
// $table_encoded and $tbl_url_query are needed inside the next "if"
|
||||
$table_encoded = urlencode($each_table['TABLE_NAME']);
|
||||
// Sets parameters for links
|
||||
$tbl_url_query = $url_query . '&table=' . $table_encoded;
|
||||
|
||||
if (isset($each_table['TABLE_ROWS'])) {
|
||||
// MyISAM, ISAM or Heap table: Row count, data size and index size
|
||||
// is accurate.
|
||||
switch ( $each_table['ENGINE']) {
|
||||
// MyISAM, ISAM or Heap table: Row count, data size and index size
|
||||
// are accurate.
|
||||
case 'MyISAM' :
|
||||
case 'ISAM' :
|
||||
case 'HEAP' :
|
||||
@@ -224,8 +221,11 @@ foreach ($tables as $keyname => $each_table) {
|
||||
// sizes are.
|
||||
|
||||
if ($each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
|
||||
$each_table['COUNTED'] = true;
|
||||
$each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
|
||||
$each_table['TABLE_NAME'], $return = true, $force_exact = true);
|
||||
} else {
|
||||
$each_table['COUNTED'] = false;
|
||||
}
|
||||
|
||||
if ($is_show_stats) {
|
||||
@@ -243,11 +243,15 @@ foreach ($tables as $keyname => $each_table) {
|
||||
$unit = '';
|
||||
}
|
||||
break;
|
||||
case 'VIEW' :
|
||||
// for a view, the ENGINE is null
|
||||
case null :
|
||||
case 'SYSTEM VIEW' :
|
||||
if ($each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
|
||||
if ($each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCountViews']) {
|
||||
$each_table['COUNTED'] = true;
|
||||
$each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
|
||||
$each_table['TABLE_NAME'], $return = true, $force_exact = true);
|
||||
} else {
|
||||
$each_table['COUNTED'] = false;
|
||||
}
|
||||
$table_is_view = true;
|
||||
break;
|
||||
@@ -257,7 +261,7 @@ foreach ($tables as $keyname => $each_table) {
|
||||
$formatted_size = 'unknown';
|
||||
$unit = '';
|
||||
}
|
||||
}
|
||||
} // end switch
|
||||
$sum_entries += $each_table['TABLE_ROWS'];
|
||||
|
||||
if (isset($each_table['Collation'])) {
|
||||
@@ -280,7 +284,6 @@ foreach ($tables as $keyname => $each_table) {
|
||||
$overhead = '-';
|
||||
}
|
||||
} // end if
|
||||
} // end if (isset($each_table['TABLE_ROWS'])
|
||||
|
||||
$alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']]))
|
||||
? str_replace(' ', ' ', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
|
||||
@@ -368,15 +371,14 @@ foreach ($tables as $keyname => $each_table) {
|
||||
// - 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['MaxExactCountViews']) {
|
||||
if ($table_is_view && $each_table['TABLE_ROWS'] >= $cfg['MaxExactCountViews'] && (! $each_table['COUNTED'])) {
|
||||
$at_least_one_view_exceeds_max_count = true;
|
||||
$row_count_pre = '~';
|
||||
$sum_row_count_pre = '~';
|
||||
$show_superscript = $max_exact_count_note;
|
||||
} elseif($each_table['ENGINE'] == 'InnoDB') {
|
||||
// InnoDB table: Row count is not accurate
|
||||
} elseif($each_table['ENGINE'] == 'InnoDB' && (! $each_table['COUNTED'])) {
|
||||
// InnoDB table: we did not get an accurate row count
|
||||
$row_count_pre = '~';
|
||||
$sum_row_count_pre = '~';
|
||||
$show_superscript = '';
|
||||
|
Reference in New Issue
Block a user