En InnoDB, $mysql->get_db_size donne des valeurs *vraiment* trop pourri.

Ce patch améliore un peu.
This commit is contained in:
Alan Garcia 2011-06-17 15:21:29 +00:00
parent 8485d8e20d
commit 3fdf1eb747
1 changed files with 2 additions and 1 deletions

View File

@ -447,7 +447,8 @@ class m_mysql {
$this->dbus->query("SHOW TABLE STATUS FROM `$dbname`;");
$size = 0;
while ($db->next_record()) {
$size += $db->f('Data_length') + $db->f('Index_length') + $db->f('Data_free');
$size += $db->f('Data_length') + $db->f('Index_length');
if ( $db->f('Engine') != 'InnoDB') $size += $db->f('Data_free');
}
return $size;
}