I have been noticing this error in watchdog every cron run. It doesn't seem to affect the search indexing or any other functionality but the error is alarming. I looked into the code and it seems like a simple fix, even if not obvious from the SQL query shown in the error.
The error:
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 '0' at line 1 query: UPDATE apachesolr_index_entities_node asn SET asn.changed = '1364023932', asn.status = 0 WHERE asn.entity_id IN 0 in /<em><path></em>/sites/all/modules/apachesolr/apachesolr.index.inc on line 1301.
This happened on 6.x-3.0-rc1 but the code is incorrect in the latest commit on the branch too. I am attaching the patch in a comment.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | apachesolr-sql-error-1955616-1.patch | 1.08 KB | hussainweb |
Comments
Comment #1
hussainwebAttaching the patch. I tested with the patch applied and found no errors in my watchdog after a cron run.
Comment #2
kevin.dutra commentedLooks good.
Comment #3
hussainwebI just checked and couldn't find this in the 6.x-3.x branch. Any idea when it can be committed, or are there any problems or suggestions?
Comment #4
pwolanin commentedthanks, committed.
Comment #5
hussainwebGreat, I see the commit at 0bb62a9. I am probably being vain but I sure wish you had marked me as the author. Still, it is great seeing my name in changelog. :)
Comment #6
pwolanin commented@hussainweb - I'm not very consistently setting the commit author, but post some more patches and I'll try to remember to for you.