mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
- InnoDB would not calculate the total size of a table.. this is now fixed..
- Applied regex majic to the stuff that checks MySQL version. Faster regex and easier to manage. git-svn-id: file:///svn/phpbb/trunk@5450 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
538f06f849
commit
5ae050ccd2
1 changed files with 3 additions and 3 deletions
|
@ -2435,9 +2435,9 @@ function get_database_size()
|
||||||
{
|
{
|
||||||
$version = $row['mysql_version'];
|
$version = $row['mysql_version'];
|
||||||
|
|
||||||
if (preg_match('#^(3\.23|4\.|5\.)#', $version))
|
if (preg_match('#(3\.23|[45]\.)#', $version))
|
||||||
{
|
{
|
||||||
$db_name = (preg_match('#^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)|(5\.)#', $version)) ? "`{$db->dbname}`" : $db->dbname;
|
$db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.#', $version)) ? "`{$db->dbname}`" : $db->dbname;
|
||||||
|
|
||||||
$sql = "SHOW TABLE STATUS
|
$sql = "SHOW TABLE STATUS
|
||||||
FROM " . $db_name;
|
FROM " . $db_name;
|
||||||
|
@ -2446,7 +2446,7 @@ function get_database_size()
|
||||||
$dbsize = 0;
|
$dbsize = 0;
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && $row['Engine'] == 'MyISAM'))
|
if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && ($row['Engine'] == 'MyISAM' || $row['Engine'] == 'InnoDB')))
|
||||||
{
|
{
|
||||||
if ($table_prefix != '')
|
if ($table_prefix != '')
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue