Mysql row-based binary logging behaving different in some versions of mysql (rows grouping)
1
vote
1
answer
536
views
Mysql row-based binary logging seems to have a different behaviour when grouping rows changes in some versions of mysql.
Let's assume the following statement update three rows:
UPDATE table_name SET a=1 WHERE id IN (1, 2, 3);
In mysql 5.7.21
: The binary log receive **only one log** containing the 3 rows changes. (Which is my desired behaviour)
However, when tested in mysql 5.7.11
and mysql 5.7.26
, the same statement produces **three separated logs**. Each one of them containing each changed row.
I have checked the system variables and, at least, the ones who are related to the binary log, seem to be exactly the same on 5.7.21
and 5.7.26
.
We have checked the startup variable --binlog-row-event-max-size
, which could be causing the problem. Since the rows in our tables could be bigger than the default 8KB. But, we are not able to set this variable. Since we are working in Amazon RDS. (How can we do it?)
I need that the rows that are changed on the same statement are always batched in the binary log. Is there some variable which could be causing this behaviour?
Notes: There is no replication involved in our setup.
Asked by Leonardo Kuffo
(109 rep)
Sep 5, 2019, 02:47 PM
Last activity: Apr 20, 2025, 04:03 PM
Last activity: Apr 20, 2025, 04:03 PM