]> matita.cs.unibo.it Git - helm.git/commitdiff
Too many OPTIMIZE TABLES (because of a very stupid bug).
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 23 Sep 2005 14:21:09 +0000 (14:21 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 23 Sep 2005 14:21:09 +0000 (14:21 +0000)
helm/matita/matitacleanLib.ml

index 3a1d2e3db5068f3af2cd02819dbcbd692827901e..dafd8097cbeb69d66450562c62601587dd35b014 100644 (file)
@@ -148,9 +148,12 @@ let clean_baseuris ?(verbose=true) buris =
   List.iter (MatitaSync.remove ~verbose) l;
   cleaned_no := !cleaned_no + List.length l;
   if !cleaned_no > 30 then
-   List.iter
-    (function table ->
-      ignore (Mysql.exec (MatitaDb.instance ()) ("OPTIMIZE TABLE " ^ table)))
-    [MetadataTypes.name_tbl (); MetadataTypes.rel_tbl ();
-     MetadataTypes.sort_tbl (); MetadataTypes.obj_tbl();
-     MetadataTypes.count_tbl()]
+   begin
+    cleaned_no := 0;
+    List.iter
+     (function table ->
+       ignore (Mysql.exec (MatitaDb.instance ()) ("OPTIMIZE TABLE " ^ table)))
+     [MetadataTypes.name_tbl (); MetadataTypes.rel_tbl ();
+      MetadataTypes.sort_tbl (); MetadataTypes.obj_tbl();
+      MetadataTypes.count_tbl()]
+   end