Just ran into a problem with update 6001 in the _filefield_update_6001_move_operation function. Using the Batch API, this update selects 50 nodes at a time to process with the following query (line 311):

$result = db_query_range("SELECT * FROM {{$context['sandbox']['table']}} WHERE vid >= %d ORDER BY vid ASC", $context['sandbox']['current_node'], 0, $limit);

In cases where the number of attachments is greater than 50, no progress is made between batches because current_node doesn't increase. This patch is a first pass at tracking the delta column along with "current_node" to allow the update to complete.

CommentFileSizeAuthor
filefield_batch_fix_0.patch2.23 KBMiles Ulrich
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Status: Needs work » Fixed

Does the job for me. Everything looks good but testing isn't likely from myself (or probably most other users). With no code problems and solid logic, I've committed this patch. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.