Commit ced52717 authored by Antoine Beaupré's avatar Antoine Beaupré
Browse files

small API change: do not include the db size in get_db_list(), which improves...

small API change: do not include the db size in get_db_list(), which improves performance on big databases
parent bb42e17a
......@@ -56,6 +56,7 @@ echo "<p>"._("help_sql_list_ok")."</p>";
$col=1;
for($i=0;$i<count($r);$i++) {
$val=$r[$i];
$val['size'] = $mysql->get_db_size($val['db']);
$col=3-$col;
?>
<tr class="lst<?php echo $col; ?>">
......
......@@ -60,7 +60,6 @@ class m_mysql {
* @return array returns an associative array as follow : <br>
* "db" => database name "bck" => backup mode for this db
* "dir" => Backup folder.
* "size" => Size of the database (in bytes)
* Returns FALSE if the user has no database.
*/
function get_dblist() {
......@@ -76,11 +75,6 @@ class m_mysql {
list($dbu,$dbn)=split_mysql_database_name($db->f("db"));
$c[]=array("db"=>$db->f("db"), "name"=>$dbn,"bck"=>$db->f("bck_mode"), "dir"=>$db->f("bck_dir"), "login"=>$db->f("login"), "pass"=>$db->f("pass"));
}
/* find the size of each database */
foreach ($c as $key => $val) {
$c[$key]['size'] = $this->get_db_size($c[$key]['db']);
}
return $c;
}
......
......@@ -16,6 +16,11 @@ alternc (0.9.10) stable; urgency=low
* add new field to member form: 'notes' which is just a text field
* send an email on new account creation. the actual email needs to be
configured through the AlternC variables for this to work.
* API changes
* m_mysql->get_db_list() doesn't include size anymore because this
is a major performance hit on MySQL < 5.1.22 if there are > 1000
databases on the system. This speeds up the AlternC login by about
30 seconds on Koumbit.org.
-- Antoine Beaupré <anarcat@koumbit.org> Wed, 28 Jan 2009 19:52:46 -0500
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment