Open auntyellow opened 4 years ago
I have a table test with column id (PK) and val.
test
id
val
I got the correct SQL without additional binlog_row_image set (default is FULL):
binlog_row_image
FULL
UPDATE `test` SET `id`=1, `val`='2' WHERE `id`=1 AND `val`='2' LIMIT 1
But when I set binlog_row_image = MINIMAL, I got the wrong SQL:
binlog_row_image = MINIMAL
UPDATE `test` SET `id`=NULL, `val`='2' WHERE `id`=1 AND `val` IS NULL LIMIT 1
Should be:
UPDATE `test` SET `val`='2' WHERE `id`=1 LIMIT 1
This is because id is omitted in after image and val is omitted in before image.
after image
before image
My MySQL version is 8.0.19
I have a table
test
with columnid
(PK) andval
.I got the correct SQL without additional
binlog_row_image
set (default isFULL
):But when I set
binlog_row_image = MINIMAL
, I got the wrong SQL:Should be:
This is because
id
is omitted inafter image
andval
is omitted inbefore image
.