Code

Do these changes even for the database which was supposed to execute these commands...
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 24 Apr 2008 12:17:28 +0000 (12:17 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 24 Apr 2008 12:17:28 +0000 (12:17 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10673 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-server

index 660b94e74e2a07d1029da4372234ea9545e58891..067bce56e81e550f2a6dafe7859f3e120cf518c8 100755 (executable)
@@ -1747,8 +1747,8 @@ sub create_fai_release_db {
 
                        daemon_log("$session_id DEBUG: Inserting ".scalar @sql_list." entries to DB",8);
                        if(@sql_list) {
+                               unshift @sql_list, "VACUUM";
                                unshift @sql_list, "DELETE FROM $table_name";
-                               unshift @sql_list, "VACUUM";   # at first vacuum the logs and clear the db
                                $fai_release_db->exec_statementlist(\@sql_list);
                        }
                        daemon_log("$session_id DEBUG: Done with inserting",7);
@@ -2133,9 +2133,11 @@ sub create_packages_list_db {
 
        close (CONFIG);
 
-       find(\&cleanup_and_extract, keys( %repo_dirs ));
+       find(\&cleanup_and_extract, keys( %repo_dirs ));
+       unshift @packages_list_statements, "VACUUM";
+       unshift @packages_list_statements, "DELETE FROM $packages_list_tn";
        $packages_list_db->exec_statementlist(\@packages_list_statements);
-       unlink($packages_list_under_construction);
+       unlink($packages_list_under_construction);
        daemon_log("$session_id INFO: create_packages_list_db: finished", 5); 
        return;
 }