X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Flibrary%2FlibraryDb.ml;h=d3e7e9831b39977da16e2ea1e40338d2b38fff6d;hb=0e850ea466d664062ad1999e75c60b90aadaa084;hp=3ea0f481aacc6ecb6534cc896afa61b1bc310341;hpb=805aeafdb6b3ca42201ba08dea0f84d8b1adc489;p=helm.git diff --git a/helm/software/components/library/libraryDb.ml b/helm/software/components/library/libraryDb.ml index 3ea0f481a..d3e7e9831 100644 --- a/helm/software/components/library/libraryDb.ml +++ b/helm/software/components/library/libraryDb.ml @@ -69,7 +69,8 @@ let clean_owner_environment () = List.iter (fun suffix -> try - HExtlib.safe_remove (Http_getter.resolve (uri ^ suffix)) + HExtlib.safe_remove + (Http_getter.resolve ~writable:true (uri ^ suffix)) with Http_getter_types.Key_not_found _ -> ()) [""; ".body"; ".types"]) owned_uris; @@ -142,7 +143,7 @@ let remove_uri uri = let dbd = instance () in let suri = UriManager.string_of_uri uri in let query table suri = sprintf - "DELETE FROM %s WHERE source LIKE '%s%%'" table (HMysql.escape suri) + "DELETE QUICK LOW_PRIORITY FROM %s WHERE source='%s'" table (HMysql.escape suri) in List.iter (fun t -> try @@ -151,19 +152,7 @@ let remove_uri uri = exn -> raise exn (* no errors should be accepted *) ) [obj_tbl;sort_tbl;rel_tbl;name_tbl;(*conclno_tbl;conclno_hyp_tbl*)count_tbl]; - (* and now the debug job *) - let dbg_q = - sprintf "SELECT source FROM %s WHERE h_occurrence LIKE '%s%%'" obj_tbl - (HMysql.escape suri) - in - try - let rc = HMysql.exec dbd dbg_q in - let l = ref [] in - HMysql.iter rc (fun a -> match a.(0) with None ->()|Some a -> l := a:: !l); - let l = List.sort Pervasives.compare !l in - HExtlib.list_uniq l - with - exn -> raise exn (* no errors should be accepted *) +;; let xpointers_of_ind uri = let dbd = instance () in