In the content.install script released with 5.x.1.4 there are Updates #1004, #1005 and #1006.

Update #1004 fails with the message "Failed: DELETE FROM {node_field} WHERE field_name NOT IN ()".

The content of the "NOT IN ()" clause is built from an array that is populated from another query "SELECT DISTINCT(field_name) FROM {node_field_instance}", and when table "node_field_instance" does not have any rows, the array is empty. This results in the empty "NOT IN ()" clause.

Updates #1005, and #1006 are not run.

Fix required.

I can comment out Update #1004 and re-run since I have backup of DB made just before update, but others may need other solutions.

Comments

yched’s picture

Status: Active » Closed (duplicate)

This is fixed in latest 1.x-dev release (see http://drupal.org/node/125185)

AFAIK, it should not prevent subsequent updates from executing, though.
Anyway, since the bug only happens if you have no fields defined, #1005 and #1006 would have no effect whatsoever.