BEGIN;
UPDATE Inno_tbl SET x = 100;
INSERT INTO Myisam_tbl SELECT x FROM Inno_tbl;
UPDATE Inno_tbl SET x = 200;
INSERT INTO Myisam_tbl SELECT x FROM Inno_tbl;
COMMIT;
To get the right values in Myisam_tbl, the transacted and non-transacted commands must be
interleaved. (I am assuming SBR, not RBR.)
> -----Original Message-----
> From: Shawn Green [mailto:shawn.l.green@stripped]
> Sent: Wednesday, August 01, 2012 12:07 PM
> To: Rick James
> Cc: David Lerer; Zhigang Zhang; mysql@stripped
> Subject: Re: How often the slave to pull data from master?
>
> 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
>