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