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);
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
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.