Derived table support was altered in MySQL 5.7 changing the way in which DELETE FROM works in some cases. This change modifies the way in which deletion occurs by selecting all IDs and batching them into groups of 1000.