mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-14605 Changes to "ON UPDATE CURRENT_TIMESTAMP" fields are not
always logged properly with binlog_row_image=MINIMAL
There are two issues fixed in this commit.
The first is an observation of a multi-table UPDATE binlogged
in row-format in binlog_row_image=MINIMAL mode. While the UPDATE aims
at a table with an ON-UPDATE attribute its binlog after-image misses
to record also installed default value.
The reason for that turns out missed marking of default-capable fields
in TABLE::write_set.
This is fixed to mark such fields similarly to 10.2's MDEV-10134 patch (db7edfed17
)
that introduced it. The marking follows up 93d1e5ce0b841bed's idea
to exploit TABLE:rpl_write_set introduced there though,
and thus does not mess (in 10.1) with the actual MDEV-10134 agenda.
The patch makes formerly arg-less TABLE::mark_default_fields_for_write()
to accept an argument which would be TABLE:rpl_write_set.
The 2nd issue is extra columns in in binlog_row_image=MINIMAL before-image
while merely a packed primary key is enough. The test main.mysqlbinlog_row_minimal
always had a wrong result recorded.
This is fixed to invoke a function that intended for read_set
possible filtering and which is called (supposed to) in all type of MDL, UPDATE
including; the test results have gotten corrected.
At *merging* from 10.1->10.2 the 1st "main" part of the patch is unnecessary
since the bug is not observed in 10.2, so only hunks from
sql/sql_class.cc
are required.
This commit is contained in:
@@ -1353,7 +1353,11 @@ public:
|
||||
void mark_columns_per_binlog_row_image(void);
|
||||
bool mark_virtual_col(Field *field);
|
||||
void mark_virtual_columns_for_write(bool insert_fl);
|
||||
void mark_default_fields_for_write();
|
||||
void mark_default_fields_for_write(MY_BITMAP* bset);
|
||||
inline void mark_default_fields_for_write()
|
||||
{
|
||||
mark_default_fields_for_write(write_set);
|
||||
}
|
||||
bool has_default_function(bool is_update);
|
||||
inline void column_bitmaps_set(MY_BITMAP *read_set_arg,
|
||||
MY_BITMAP *write_set_arg)
|
||||
|
Reference in New Issue
Block a user