summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngie Byron2010-12-01 00:21:02 (GMT)
committerAngie Byron2010-12-01 00:21:02 (GMT)
commit5c3fdc3ee1635b06a4136e7accc0a7f360840e92 (patch)
tree58e953c3c9f065d17ac5c21374eb3d44026d31f2
parent5baaa76b9af4f2a864ca82b48d314ad6ff83c2f4 (diff)
#985184 by Steven Jones: Fix brain-o in Batch query causing bad performance on large tables.
-rw-r--r--includes/batch.queue.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/batch.queue.inc b/includes/batch.queue.inc
index 8193280..ee72146 100644
--- a/includes/batch.queue.inc
+++ b/includes/batch.queue.inc
@@ -21,7 +21,7 @@
class BatchQueue extends SystemQueue {
public function claimItem($lease_time = 0) {
- $item = db_query('SELECT data, item_id FROM {queue} q WHERE name = :name ORDER BY item_id ASC', array(':name' => $this->name))->fetchObject();
+ $item = db_query_range('SELECT data, item_id FROM {queue} q WHERE name = :name ORDER BY item_id ASC', 0, 1, array(':name' => $this->name))->fetchObject();
if ($item) {
$item->data = unserialize($item->data);
return $item;