civicrm/civicrm-core — pull request #2294 by pratik-joshi (2014-01-06 19:39:48+00:00)
Title: CRM-14036_fix

In upgrade we were not adding constraint rule for civicrm_activity_contact table. That the reason why contacts are being deleted without deletion of civicrm_activity_contact entries.

handled upgrade so that, foreign key constraint rule exists and also deleted un-mapped records WRT contact_id and activity_id.