Bulk deletion fails for users with personal messages with replies
Bug #916998 reported by
Richard Mansfield
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Richard Mansfield |
Bug Description
When a user is deleted, an attempt is made to delete all notification_
This error occurs outside the db transaction in delete_user(), so usually this bug doesn't stop users from being deleted, it stops their internal notifications from being deleted. In bulk delete operations, all the calls to delete_user are wrapped in a transaction, so deletion fails.
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Reviewed: https:/ /reviews. mahara. org/993 gitorious. org/mahara/ mahara/ commit/ 9bc9d15c2780e7b 12f49595a482d65 ed8cd76e53
Committed: http://
Submitter: Francois Marier (<email address hidden>)
Branch: master
commit 9bc9d15c2780e7b 12f49595a482d65 ed8cd76e53
Author: Richard Mansfield <email address hidden>
Date: Mon Jan 16 14:12:07 2012 +1300
Fix sql error in bulk user deletion (bug #916998)
When a user is deleted, deletion of notification_ internal_ activity n_internal_ activity has a parent field pointing to one of
records can fail with a foreign key error when another row in
notificatio
the records we are trying to delete. This is fixed by setting the
parent fields to null before deletion.
The handle_ event(' deleteuser' ) call in delete_user is also moved
inside the transaction, to ensure that deleted users will have their
notifications deleted correctly. Other subscribers to the deleteuser
event in core should be unaffected.
Change-Id: Ibc0a695e986bb1 75a00441f02d3e4 0abf38cbcde
Signed-off-by: Richard Mansfield <email address hidden>