bug #1523747 [innodb] make warning about row count more visible
This commit is contained in:
@@ -14,6 +14,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
||||
- bug #1648802 different mysql library and server version
|
||||
- bug #1662976 [auth] Authentication fails when controluser/pass is set
|
||||
- bug #1643758 [import] Error #1264 importing NULL values in MySQL 5.0
|
||||
- bug #1523747 [innodb] make warning about row count more visible
|
||||
- [gui] avoid displaying a wide selector in server selection
|
||||
+ [core] added PMA_fatalError() and made use of it
|
||||
. [i18n] use generic $strOptions
|
||||
|
@@ -179,6 +179,7 @@ $row_count = 0;
|
||||
$hidden_fields = array();
|
||||
$odd_row = true;
|
||||
$at_least_one_view_exceeds_max_count = false;
|
||||
$sum_row_count_pre = '';
|
||||
|
||||
foreach ($tables as $keyname => $each_table) {
|
||||
if ($each_table['TABLE_ROWS'] === null || $each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
|
||||
@@ -356,12 +357,19 @@ foreach ($tables as $keyname => $each_table) {
|
||||
if (isset($each_table['TABLE_ROWS']) && ($each_table['ENGINE'] != null || $table_is_view)) {
|
||||
if ($table_is_view && $each_table['TABLE_ROWS'] >= $cfg['MaxExactCountViews']) {
|
||||
$at_least_one_view_exceeds_max_count = true;
|
||||
$row_count_pre = '~';
|
||||
$sum_row_count_pre = '~';
|
||||
$show_superscript = '<sup>1</sup>';
|
||||
} elseif($each_table['ENGINE'] == 'InnoDB') {
|
||||
// InnoDB table: Row count is not accurate
|
||||
$row_count_pre = '~';
|
||||
$sum_row_count_pre = '~';
|
||||
} else {
|
||||
$row_count_pre = '';
|
||||
$show_superscript = '';
|
||||
}
|
||||
?>
|
||||
<td class="value"><?php echo PMA_formatNumber($each_table['TABLE_ROWS'], 0) . $show_superscript; ?></td>
|
||||
<td class="value"><?php echo $row_count_pre . PMA_formatNumber($each_table['TABLE_ROWS'], 0) . $show_superscript; ?></td>
|
||||
<?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
|
||||
<td nowrap="nowrap"><?php echo ($table_is_view ? $strView : $each_table['ENGINE']); ?></td>
|
||||
<?php if (isset($collation)) { ?>
|
||||
@@ -407,7 +415,7 @@ if ($is_show_stats) {
|
||||
</th>
|
||||
<th colspan="<?php echo ($db_is_information_schema ? 3 : 6) ?>" align="center">
|
||||
<?php echo $strSum; ?></th>
|
||||
<th class="value"><?php echo PMA_formatNumber($sum_entries, 0); ?></th>
|
||||
<th class="value"><?php echo $sum_row_count_pre . PMA_formatNumber($sum_entries, 0); ?></th>
|
||||
<?php
|
||||
if (!($cfg['PropertiesNumColumns'] > 1)) {
|
||||
$default_engine = PMA_DBI_get_default_engine();
|
||||
|
@@ -1717,6 +1717,25 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
|
||||
global $sql_query, $num_rows, $unlim_num_rows, $pos, $fields_meta, $fields_cnt;
|
||||
global $vertical_display, $disp_direction, $repeat_cells, $highlight_columns;
|
||||
global $cfgRelation;
|
||||
global $showtable;
|
||||
|
||||
/**
|
||||
* @todo move this to a central place
|
||||
* @todo for other future table types
|
||||
*/
|
||||
$is_innodb = (isset($showtable['Type']) && $showtable['Type'] == 'InnoDB');
|
||||
|
||||
if (!isset($analyzed_sql[0]['queryflags']['union'])
|
||||
&& !isset($analyzed_sql[0]['table_ref'][1]['table_name'])
|
||||
&& (empty($analyzed_sql[0]['where_clause'])
|
||||
|| $analyzed_sql[0]['where_clause'] == '1 ')) {
|
||||
// "j u s t b r o w s i n g"
|
||||
$pre_count = '~';
|
||||
$after_count = '[sup]1[/sup]';
|
||||
} else {
|
||||
$pre_count = '';
|
||||
$after_count = '';
|
||||
}
|
||||
|
||||
// 1. ----- Prepares the work -----
|
||||
|
||||
@@ -1762,12 +1781,18 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
|
||||
$last_shown_rec = ($GLOBALS['session_max_rows'] == 'all' || $pos_next > $total)
|
||||
? $total - 1
|
||||
: $pos_next - 1;
|
||||
PMA_showMessage($GLOBALS['strShowingRecords'] . " $pos - $last_shown_rec (" . PMA_formatNumber($total, 0) . ' ' . $GLOBALS['strTotal'] . $selectstring . ', ' . sprintf($GLOBALS['strQueryTime'], $GLOBALS['querytime']) . ')');
|
||||
if (isset($table) && PMA_Table::isView($db, $table) && $total == $GLOBALS['cfg']['MaxExactCount']) {
|
||||
PMA_showMessage($GLOBALS['strShowingRecords'] . " $pos - $last_shown_rec (" . $pre_count . PMA_formatNumber($total, 0) . $after_count . ' ' . $GLOBALS['strTotal'] . $selectstring . ', ' . sprintf($GLOBALS['strQueryTime'], $GLOBALS['querytime']) . ')');
|
||||
|
||||
if (PMA_Table::isView($db, $table) && $total == $GLOBALS['cfg']['MaxExactCount']) {
|
||||
echo '<div class="notice">' . "\n";
|
||||
echo PMA_sanitize(sprintf($GLOBALS['strViewMaxExactCount'], PMA_formatNumber($GLOBALS['cfg']['MaxExactCount'], 0), '[a@./Documentation.html#cfg_MaxExactCount@_blank]', '[/a]')) . "\n";
|
||||
echo '</div>' . "\n";
|
||||
}
|
||||
if ($pre_count) {
|
||||
echo '<div class="notice">' . "\n";
|
||||
echo '<sup>1</sup>' . PMA_sanitize($GLOBALS['strApproximateCount']) . "\n";
|
||||
echo '</div>' . "\n";
|
||||
}
|
||||
|
||||
} elseif (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
|
||||
PMA_showMessage($GLOBALS['strSQLQuery']);
|
||||
|
Reference in New Issue
Block a user