Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-06-29 13:28:17 +02:00
commit 8d9060dcf2
4 changed files with 23 additions and 3 deletions

View File

@ -22,6 +22,7 @@ phpMyAdmin - ChangeLog
4.2.6.0 (not yet released)
- bug #4471 Undefined index warning with referenced column.
- bug #4027 $cfg['MaxExactCount'] is ignored when BROWSING is back
4.2.5.0 (2014-06-26)
- bug #4467 shell_exec() has been disabled for security reasons

View File

@ -2556,7 +2556,7 @@ Various display setting
.. config:option:: $cfg['MaxExactCount']
:type: integer
:default: 0
:default: 500000
For InnoDB tables, determines for how large tables phpMyAdmin should
get the exact row count using ``SELECT COUNT``. If the approximate row

View File

@ -2540,7 +2540,7 @@ $cfg['BrowseMIME'] = true;
*
* @global integer $cfg['MaxExactCount']
*/
$cfg['MaxExactCount'] = 0;
$cfg['MaxExactCount'] = 500000;
/**
* Zero means that no row count is done for views; see the doc

View File

@ -1424,11 +1424,30 @@ function PMA_countQueryResults(
// However, do not count again if we did it previously
// due to $find_real_end == true
if ($justBrowsing) {
// Get row count (is approximate for InnoDB)
$unlim_num_rows = PMA_Table::countRecords(
$db,
$table,
true
false
);
/**
* @todo Can we know at this point that this is InnoDB,
* (in this case there would be no need for getting
* an exact count)?
*/
if ($unlim_num_rows < $GLOBALS['cfg']['MaxExactCount']) {
// Get the exact count if approximate count
// is less than MaxExactCount
/**
* @todo In countRecords(), MaxExactCount is also verified,
* so can we avoid checking it twice?
*/
$unlim_num_rows = PMA_Table::countRecords(
$db,
$table,
true
);
}
} else {
// add select expression after the SQL_CALC_FOUND_ROWS