diff --git a/lib/modules/Search.pmod/Database.pmod/MySQL.pike b/lib/modules/Search.pmod/Database.pmod/MySQL.pike
index 38a4e9d1df92474427abdf4e593803811da3466a..550fc5124d61acdba333d8d69d9dc7370c9204ce 100644
--- a/lib/modules/Search.pmod/Database.pmod/MySQL.pike
+++ b/lib/modules/Search.pmod/Database.pmod/MySQL.pike
@@ -299,7 +299,7 @@ void remove_document(string|Standards.URI uri, void|string language)
     return;
   
   db->query("delete from document where id in ("+a->id*","+")");
-  db->query("insert delayed into deleted_document (doc_id) values "+
+  db->query("insert into deleted_document (doc_id) values "+
 	    "("+a->id*"),("+")");
 }
 
@@ -319,7 +319,7 @@ void remove_document_prefix(string|Standards.URI uri)
 #endif
   db->query("DELETE FROM document "
 	    " WHERE id IN (" + (ids * ",") + ")");
-  db->query("INSERT DELAYED INTO deleted_document "
+  db->query("INSERT INTO deleted_document "
 	    "(doc_id) VALUES (" + (ids * "),(") + ")");
 }
 
@@ -661,7 +661,7 @@ void set_metadata(Standards.URI|string uri, void|string language,
 				a[0], a[1]);
 	       }) * ", ";
   
-  db->query("replace delayed into metadata (doc_id, name, value) values "+s);
+  db->query("replace into metadata (doc_id, name, value) values "+s);
 }
 
 void set_lastmodified(Standards.URI|string uri,