commit or rollback on a statement based replication, effect on auto increment id
I think you will find an extra "statement" in the binlog that assigns the auto_inc value for the subsequent statement.  This guarantees that the Slave has the same ids for SBR.

For RBR (Row-Based-Replication), there is no issue, since the id is part of the INSERT.

In addition to the possibility of "burning" ("losing") ids, the ids can be replicated out of order.  This because ids are grabbed as needed, but replication is in COMMIT-order.  (This applies to SBR and RBR.)

For multi-master, auto_increment_increment &gt; 1 -- another reason for gaps in the ids.