small API change: do not include the db size in get_db_list(), which improves performance on big databases
This commit is contained in:
parent
bb42e17a9c
commit
ced52717dd
|
@ -56,6 +56,7 @@ echo "<p>"._("help_sql_list_ok")."</p>";
|
||||||
$col=1;
|
$col=1;
|
||||||
for($i=0;$i<count($r);$i++) {
|
for($i=0;$i<count($r);$i++) {
|
||||||
$val=$r[$i];
|
$val=$r[$i];
|
||||||
|
$val['size'] = $mysql->get_db_size($val['db']);
|
||||||
$col=3-$col;
|
$col=3-$col;
|
||||||
?>
|
?>
|
||||||
<tr class="lst<?php echo $col; ?>">
|
<tr class="lst<?php echo $col; ?>">
|
||||||
|
|
|
@ -60,7 +60,6 @@ class m_mysql {
|
||||||
* @return array returns an associative array as follow : <br>
|
* @return array returns an associative array as follow : <br>
|
||||||
* "db" => database name "bck" => backup mode for this db
|
* "db" => database name "bck" => backup mode for this db
|
||||||
* "dir" => Backup folder.
|
* "dir" => Backup folder.
|
||||||
* "size" => Size of the database (in bytes)
|
|
||||||
* Returns FALSE if the user has no database.
|
* Returns FALSE if the user has no database.
|
||||||
*/
|
*/
|
||||||
function get_dblist() {
|
function get_dblist() {
|
||||||
|
@ -76,11 +75,6 @@ class m_mysql {
|
||||||
list($dbu,$dbn)=split_mysql_database_name($db->f("db"));
|
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"));
|
$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;
|
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
|
* 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
|
* send an email on new account creation. the actual email needs to be
|
||||||
configured through the AlternC variables for this to work.
|
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
|
-- Antoine Beaupré <anarcat@koumbit.org> Wed, 28 Jan 2009 19:52:46 -0500
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue