civicrm/civicrm-core — pull request #1037 by deepak-srivastava (2013-06-20 12:30:03+00:00)
Title: CRM-12867

Problem was that in alterDisplay we try to suppress some rows concluding duplicate / repetition. Final count (displayed in stats) is different from those present in temp table (displayed as pager) and therefore a mismatch.
The included fix does a group by on temp table so $rows in php and number of records in temp table match.

Another fix was made to include consider group by of 'altered_contact_id' instead of 'entity_id' which gave better / less-repetitive results.
For example - just an email update of a contact - updates contact, email and custom (assuming 1 custom table) tables - a total of 3 tables. And the log report would show the update logs 3 times instead of 1.

----------------------------------------
* CRM-12867: Changelog enhanced summary report: pagination erroneous count
http://issues.civicrm.org/jira/browse/CRM-12867