[ticket/16629] Fix ACP get_database_size() for MySql 8

PHPBB3-16629
This commit is contained in:
3D-I 2020-11-05 05:07:54 +01:00
parent d3afd6ec68
commit 4b2c253427

View file

@ -2850,7 +2850,7 @@ function get_database_size()
if ($row) if ($row)
{ {
$version = $row['mysql_version']; $version = $row['mysql_version'];
$mysql_engine = ['MyISAM', 'InnoDB', 'Aria'];
$db_name = $db->get_db_name(); $db_name = $db->get_db_name();
$sql = 'SHOW TABLE STATUS $sql = 'SHOW TABLE STATUS
@ -2860,7 +2860,7 @@ function get_database_size()
while ($row = $db->sql_fetchrow($result)) while ($row = $db->sql_fetchrow($result))
{ {
if (isset($row['Engine']) if (isset($row['Engine'])
&& ($row['Engine'] == ('MyISAM' || 'InnoDB' || 'Aria')) && in_array($row['Engine'], $mysql_engine)
) )
{ {
$database_size += $row['Data_length'] + $row['Index_length']; $database_size += $row['Data_length'] + $row['Index_length'];