Skip to content
Snippets Groups Projects
Commit 9718b2ae authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Search.Database.MySQL: Don't used DELAYED queries.

The DELAYED query modifier is:

  * Not supported with InnoDB tables. This causes failures with
    MySQL versions (eg 5.5) where InnoDB (and not MyISAM) is default.

  * Ignored in MySQL 5.6.

  * Deprecated in MySQL 5.6.6.

Fixes [bug 7255].
parent 282c37a4
No related branches found
No related tags found
No related merge requests found
...@@ -299,7 +299,7 @@ void remove_document(string|Standards.URI uri, void|string language) ...@@ -299,7 +299,7 @@ void remove_document(string|Standards.URI uri, void|string language)
return; return;
db->query("delete from document where id in ("+a->id*","+")"); 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*"),("+")"); "("+a->id*"),("+")");
} }
...@@ -319,7 +319,7 @@ void remove_document_prefix(string|Standards.URI uri) ...@@ -319,7 +319,7 @@ void remove_document_prefix(string|Standards.URI uri)
#endif #endif
db->query("DELETE FROM document " db->query("DELETE FROM document "
" WHERE id IN (" + (ids * ",") + ")"); " WHERE id IN (" + (ids * ",") + ")");
db->query("INSERT DELAYED INTO deleted_document " db->query("INSERT INTO deleted_document "
"(doc_id) VALUES (" + (ids * "),(") + ")"); "(doc_id) VALUES (" + (ids * "),(") + ")");
} }
...@@ -661,7 +661,7 @@ void set_metadata(Standards.URI|string uri, void|string language, ...@@ -661,7 +661,7 @@ void set_metadata(Standards.URI|string uri, void|string language,
a[0], a[1]); 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, void set_lastmodified(Standards.URI|string uri,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment