Here's the drop-in replacement for function qa_db_table_size() in qa-db-admin.php:
function qa_db_table_size()
/*
Return the total size in bytes of all relevant tables in the Q2A database
*/
{
if (defined('QA_MYSQL_USERS_PREFIX')) { // check if one of the prefixes is a prefix itself of the other
if (stripos(QA_MYSQL_USERS_PREFIX, QA_MYSQL_TABLE_PREFIX)===0)
$prefixes=array(QA_MYSQL_TABLE_PREFIX);
elseif (stripos(QA_MYSQL_TABLE_PREFIX, QA_MYSQL_USERS_PREFIX)===0)
$prefixes=array(QA_MYSQL_USERS_PREFIX);
else
$prefixes=array(QA_MYSQL_TABLE_PREFIX, QA_MYSQL_USERS_PREFIX);
} else
$prefixes=array(QA_MYSQL_TABLE_PREFIX);
$size=0;
foreach ($prefixes as $prefix) {
$statuses=qa_db_read_all_assoc(qa_db_query_raw(
"SHOW TABLE STATUS LIKE '".$prefix."%'"
));
foreach ($statuses as $status)
$size+=$status['Data_length']+$status['Index_length'];
}
return $size;
}
Note that if you share user tables across Q2A installations, the data for those users will be included on every admin/stats page, so totalling them up with cause double counting.
This fix will be rolled into Q2A 1.6.3.