[MDEV-14605] ON UPDATE CURRENT_TIMESTAMP fields by multi-table UPDATE are not logged with binlog_row_image=MINIMAL Created: 2017-12-07 Updated: 2021-02-06 Resolved: 2019-01-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.1.26 |
| Fix Version/s: | 10.1.38 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Andrei Elkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | binlog, timestamp, update | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
When binlog_row_image=MINIMAL is configured and an "ON UPDATE CURRENT_TIMESTAMP" field is automatically changed due to an update to the row, that change should be logged to the binlog with all of the other changes to the row, but that does not always happen. One case where this happens is when using the multi-table syntax for UPDATE. For example, run the following test:
When the following is configured:
Then the updated timestamp will be missing from the resulting binlog event created by the UPDATE statement:
If binlog_row_image=MINIMAL is not set, then the updated value is in the binlog event:
|
| Comments |
| Comment by Elena Stepanova [ 2017-12-10 ] |
|
Reproducible with 10.1, although 10.2 seems to work all right. |
| Comment by Andrei Elkin [ 2019-01-21 ] |
|
7d1cb6f1ea9 is pushed to bb-10.1-andrei. Could you please review it? Thanks. Andrei |
| Comment by Andrei Elkin [ 2019-01-24 ] |
|
Pushed f9ac7032cbc. |
| Comment by Karl Klepper [ 2021-02-06 ] |
|
I just happened to stumble upon this bug with 10.1.26-MariaDB because a cron job kept updating the same records indefinitely. I could reproduce this via http, whereas the very same sql expression succeeded in adminer. After I found out, the easiest way for me to proceed was to augment my query with , tmstmp = NOW() /* was not updated automatically for no apparent reason in ... triggered by ... */ |