function multi_databases_list_fill($instance_id)
{
    $prefix = "INSERT IGNORE INTO mysqldbsmulti (instance_id,databasename,TableCount,dbsize) VALUES ";
    $q = new mysql_multi($instance_id);
    $q2 = new mysql();
    $databases = $q->DATABASE_LIST_SIMPLE();
    if ($GLOBALS["VERBOSE"]) {
        echo "Found " . count($databases) . " databases\n";
    }
    while (list($database, $ligne) = each($databases)) {
        $rr = multi_databases_list_tables($instance_id, $database);
        $TableCount = $rr[0];
        $Size = $rr[1];
        if ($GLOBALS["VERBOSE"]) {
            echo "Found database `{$database}` {$TableCount} tables ({$Size})\n";
        }
        $f[] = "({$instance_id},'{$database}','{$TableCount}','{$Size}')";
    }
    if (count($f) > 0) {
        $q2->QUERY_SQL("DELETE FROM mysqldbsmulti WHERE instance_id='{$instance_id}'", "artica_backup");
        $q2->QUERY_SQL($prefix . @implode(",", $f), "artica_backup");
    }
}