Dear all,
content_revision__del() uses
-- Clear the audit
delete from cr_item_publish_audit
where old_revision = delete__revision_id
or new_revision = delete__revision_id;
but there was no index on either
old_revision
or
new_revision
. Therefore, on substantial databases, deleting a revision could took many seconds.
content_item__del
was not affected by this slowness, since it deletes the audit-trail items via
item_id
.
Furthermore, the foreign key from cr_item_publish_audit (item_id)
to cr_items
was missing. Therefore it could contain item_ids not present in cr_items
. Added as well foreign keys for old_revision
or new_revision
.
I have fixed these issues on cvs head.