During the execution of transactional statements, the server will perform additional processing. When the server executes multiple transactions in parallel, in order to record them together, the concept of transaction cache needs to be introduced. Refresh the transaction to the binary log when the transaction is committed. Processing of non-transactional statements.Follow the following three rules:
1) if a non-transactional statement is marked as a transactional statement, it is written to the transaction buffer.
2) if it is not marked as a transactional statement and is not in the transaction cache, binary logs are written directly.
3) write the transaction buffer if it is not marked as transactional but there is a transaction cache.
Note:If a non-transactional statement exists in a transaction, rule 2 is used to write the statements that affect the non-transactional table directly to the binary log.