On 8/1/2012 1:13 PM, Rick James wrote:
That leads to another question...
Does this 'separate cache' contain an extra copy (vs the 'only' copy) of the 
non-transacted events?
I would expect that it must be an extra copy.


No. The non-transacted events are applied to the tables they belong to as they are executed. We track them in this cache for replication purposes. Are you worried about a race between a crash and the time where the cache is applied to the main binary logs?

This is a very unlikely event for two reasons:

1) the non-transacted change must occur within a transaction

2) most users that use transactions only use transaction-enabled storage engines (InnoDB).

So in order to lose non-transacted changes from a crash that happens before the cache is appended to the binary log, you must a) have a sequence of statements (or ROW-based changes) that is smaller than --binlog-cache-size limit
b) have a mixed-mode transaction.

If this is a valid concern for your usage pattern set --binlog-cache-size to a smaller value.
http://dev.mysql.com/doc/refman/5.5/en/replication-options-binary-log.html#sysvar_binlog_cache_size

--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql

Reply via email to