I got the following error information when I do database update (Drupal 5.3 ).

Drupal database update

* user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXISTS ( SELECT * FROM files f2 WHERE f2.filepath = f1.filepath query: SELECT f1.fid, f1.nid, f1.filepath FROM files f1 INNER JOIN node n ON f1.nid = n.nid WHERE n.type = 'image' AND EXISTS ( SELECT * FROM files f2 WHERE f2.filepath = f1.filepath AND f1.fid <> f2.fid AND f1.fid < f2.fid ) in /homepages/88/d1637957900/htdocs/wcces.www/includes/database.mysql.inc on line 172.
* user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXISTS (SELECT * FROM files WHERE files.fid = file_revisions.fi query: DELETE FROM file_revisions WHERE NOT EXISTS (SELECT * FROM files WHERE files.fid = file_revisions.fid) in /homepages/88/d1637957900/htdocs/wcces.www/includes/database.mysql.inc on line 172.
* Please note that invite now depends on the token module.

Updates were attempted. If you see no failures below, you may proceed happily to the administration pages. Otherwise, you may need to update your database manually. All errors have been logged.

* Main page
* Administration pages

The following queries were executed
image module
Update #2

* No queries

Update #3

* No queries

Update #4

* Failed: DELETE FROM {file_revisions} WHERE NOT EXISTS (SELECT * FROM {files} WHERE {files}.fid = {file_revisions}.fid)

Update #5

* No queries

invite module
Update #6

* No queries

Update #7

* The message tokens for the invite module have been successfully updated.

Update #8

* ALTER TABLE {invite} ADD COLUMN data TEXT NOT NULL
* ALTER TABLE {invite} DROP message

Update #9

* The access permissions have been updated by the invite module.

Update #10

* The tokens for the invite module have been successfully updated.

Update #11

* The access permissions have been updated by the invite module.

Comments

fuzi’s picture

Thank you!

fuzi

r3dw00d’s picture

what was the fix?