mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/16629] Fix ACP get_database_size() for MySql 8
PHPBB3-16629
This commit is contained in:
parent
d3afd6ec68
commit
4b2c253427
1 changed files with 4 additions and 4 deletions
|
@ -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'];
|
||||||
|
|
Loading…
Add table
Reference in a new issue