Commit 1eb0b167 authored by Dave Reid's avatar Dave Reid

Fixed COUNT() is an expensive query when used with InnoDB (see #196862).

parent ee9f7ed7
......@@ -421,7 +421,7 @@ function xmlsitemap_update_6202() {
}
// Add the default sitemap(s) and use language contexts if possible.
if (!db_query("SELECT COUNT(smid) FROM {xmlsitemap_sitemap}")->fetchField()) {
if (!db_query_range("SELECT 1 FROM {xmlsitemap_sitemap}", 0, 1)->fetchField()) {
// Refresh the schema and load the module if it's disabled.
drupal_get_schema(NULL, TRUE);
drupal_load('module', 'xmlsitemap');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment