Bug #76708 A new/old row for UPDATE trigger
Submitted: 15 Apr 2015 14:37
Reporter: Programmer Old Email Updates:
Status: Open Impact on me:
Category:MySQL Server Severity:S4 (Feature request)
Version:5.6.14-log OS:Any
Assigned to: CPU Architecture:Any

[15 Apr 2015 14:37] Programmer Old
The splendid records NEW and OLD are really not enough, when one is interested in change on UPDATE. NULL is always a problem.

How to repeat:
Now, when there is "ON UPDATE CURRENT_TIMESTAMP" on any field, MySQL already checks whether the other fields have changed.

Suggested fix:
It would be of great behoof to the UPDATE-trigger programmer if this information were offered in a record like NEW and OLD, but with all types BOOL(EAN) NOT NULL.
Say it is called "SAM": SAM.a is TRUE if the update does not change field "a", but FALSE if it does. If one wishes to check whether any of "a", "b", "c", or "d" changed, one could write