SHOW TABLE STATUS / SELECT COUNT (*) fixes continues, now configurable
This commit is contained in:
@@ -1224,13 +1224,13 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
*/
|
||||
function PMA_countRecords($db, $table, $ret = FALSE)
|
||||
{
|
||||
global $err_url;
|
||||
global $err_url, $cfg;
|
||||
if (PMA_MYSQL_INT_VERSION >= 32303) {
|
||||
$local_query = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\' FROM \'' . PMA_sqlAddslashes($table, TRUE) . '\'';
|
||||
$result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url);
|
||||
$showtable = PMA_mysql_fetch_array($result);
|
||||
$num = (isset($showtable['Rows']) ? $showtable['Rows'] : 0);
|
||||
if ($num < 20000) unset($num);
|
||||
if ($num < $cfg['MaxExactCount']) unset($num);
|
||||
mysql_free_result($result);
|
||||
}
|
||||
if (!isset($num)) {
|
||||
|
Reference in New Issue
Block a user