remove the size_db cache, it wasn't used in the code and is fully accessible from the PHP/MySQL API

This commit is contained in:
Antoine Beaupré 2007-08-21 00:14:13 +00:00
parent 37b2219bbf
commit 675a357932
4 changed files with 2 additions and 21 deletions

1
.gitattributes vendored
View File

@ -312,6 +312,7 @@ install/upgrades/0.9.4.sql -text
install/upgrades/0.9.5.sh -text
install/upgrades/0.9.5.sql -text
install/upgrades/0.9.6.sql -text
install/upgrades/0.9.7.sql -text
install/upgrades/README -text
man/alternc-admintools.8 -text
man/alternc-admintools.fr.8 -text

View File

@ -438,18 +438,6 @@ PRIMARY KEY ( `login` )
) COMMENT = 'Allowed account for secondary mx managment';
-- --------------------------------------------------------
-- TABLES de mémorisation de la taille des dossiers web/mail/db
CREATE TABLE IF NOT EXISTS `size_db` (
`db` varchar(255) NOT NULL default '',
`size` int(10) unsigned NOT NULL default '0',
`ts` timestamp(14) NOT NULL,
PRIMARY KEY (`db`),
KEY `ts` (`ts`)
) TYPE=MyISAM COMMENT='MySQL Database used space';
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `size_mail` (
`alias` varchar(255) NOT NULL default '',

View File

@ -0,0 +1 @@
DROP TABLE IF EXISTS `size_db`;

View File

@ -14,15 +14,6 @@ while ($c=mysql_fetch_array($r)) {
echo " done ($size KB)\n"; flush();
}
echo "---------------------------\n Generating size-cache for db accounts\n\n";
$r=mysql_query("SELECT db FROM db;");
while ($c=mysql_fetch_array($r)) {
echo $c["db"]; flush();
$size=$mysql->get_db_size($c["db"]);
mysql_query("REPLACE INTO size_db SET db='".addslashes($c["db"])."',size='$size';");
echo " done ($size KB) \n"; flush();
}
echo "---------------------------\n Generating size-cache for web accounts\n\n";
$r=mysql_query("SELECT uid,login FROM membres;");
while ($c=mysql_fetch_array($r)) {