From 252ef1b15ab9eb546ff9b3477939c83401b25e31 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 31 Dec 2006 17:15:56 +0000 Subject: [PATCH] RFE #1548637, option to not display record counts for views --- ChangeLog | 3 +++ Documentation.html | 14 ++++++++------ db_structure.php | 4 ++-- libraries/Table.class.php | 33 ++++++++++++++++++++++----------- libraries/config.default.php | 4 ++-- 5 files changed, 37 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index f73f99b9e..d7e836e26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,9 @@ $HeadURL$ 2006-12-31 Marc Delisle * Documentation.html: RFE #1602243, another cause for Missing parameter, thanks to Dave Nolan + * Documentation.html, db_structure.php, libraries/Table.class.php, + /config.default.php: RFE #1548637, MaxExactCountViews (default 0) + so by default, row count is not done for views 2006-12-30 Marc Delisle * libraries/Config.class.php: bug #1590083, diff --git a/Documentation.html b/Documentation.html index 951193e38..f86a60661 100644 --- a/Documentation.html +++ b/Documentation.html @@ -1754,16 +1754,18 @@ $cfg['TrustedProxies'] =
Enable MIME-transformations.
$cfg['MaxExactCount'] integer
-
  • For InnoDB tables, determines for how large tables phpMyAdmin +
    For InnoDB tables, determines for how large tables phpMyAdmin should get the exact row count using SELECT COUNT. If the approximate row count as returned by SHOW TABLE STATUS is smaller than this value, SELECT COUNT will be used, otherwise the approximate - count will be used.
  • -
  • For VIEWs, since obtaining the exact count could have an - impact on performance, this value is the maximum to be displayed. -
  • -
+ count will be used. +
+
$cfg['MaxExactCountViews'] integer
+
For VIEWs, since obtaining the exact count could have an + impact on performance, this value is the maximum to be displayed, using + a SELECT COUNT ... LIMIT. The default value of 0 bypasses + any row counting.
diff --git a/db_structure.php b/db_structure.php index 4e2b31481..2d0d84484 100644 --- a/db_structure.php +++ b/db_structure.php @@ -348,7 +348,7 @@ foreach ($tables as $keyname => $each_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']) { + if ($table_is_view && $each_table['TABLE_ROWS'] >= $cfg['MaxExactCountViews']) { $at_least_one_view_exceeds_max_count = true; $show_superscript = '1'; } else { @@ -489,7 +489,7 @@ echo '