fixed a bug that when deleting objects in mysql with criteria containing key column, it would fail. So we put "SET SQL_SAFE_UPDATES = 0;" before deleting script.