En InnoDB, $mysql->get_db_size donne des valeurs *vraiment* trop pourri.
Ce patch améliore un peu.
This commit is contained in:
parent
8485d8e20d
commit
3fdf1eb747
|
@ -447,7 +447,8 @@ class m_mysql {
|
||||||
$this->dbus->query("SHOW TABLE STATUS FROM `$dbname`;");
|
$this->dbus->query("SHOW TABLE STATUS FROM `$dbname`;");
|
||||||
$size = 0;
|
$size = 0;
|
||||||
while ($db->next_record()) {
|
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;
|
return $size;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue