Details
-
Type: Patch
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.0.7
-
Fix Version/s: Unscheduled
-
Component/s: Core CiviCRM
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
Dave Schafer and I have noted that there are many update transactions being written into the log tables that are not actually changing the data in the table. I believe this is likely because the code does updates in various places to be on the safe side, perhaps in the library we are using.
The attached patch ensures that when logging is enabled, update transactions are only written to log tables when there are changes being written to the primary table.
Potential enhancement we didn't explore: trying to find a way to cancel the update without generating an error in order to avoid the unnecessary write.