07a6698d01
This changes the cache purge code to select IDs for deletion first, rather than using a subquery in a DELETE, since this risks causing a deadlock in MySQL.