From: Date: June 10 2008 10:18pm Subject: RE: Flush queries being written to the binary log List-Archive: http://lists.mysql.com/internals/35677 Message-Id: <82624B02DA0A3C4691069A83007F651D018A65FF@SNV-EXVS08.ds.corp.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable FLUSH [BIN/RELAY]LOGS might have a big benefit in replication -- cleanly marking some spot in the replication stream at the same spot on the master and slave(s). This might lead to much cleaner scripts for failover, etc. (Yeah, it might not help in multi-master topologies where more than one master is being written to.) =20 Rick James MySQL Geeks - Consulting & Review =20 > -----Original Message----- > From: eric.bergen@stripped=20 > [mailto:eric.bergen@stripped] On Behalf Of Eric Bergen > Sent: Monday, June 09, 2008 3:25 PM > To: Paul DuBois > Cc: Internals List > Subject: Re: Flush queries being written to the binary log >=20 > I know it's the default. I'm just curious what the benefit of writing > things like flush tables to the log is. It seems like it would cause > more problems than it solves (does it solve any?). >=20 > On Mon, Jun 9, 2008 at 3:22 PM, Paul DuBois wrote: > > > > On Jun 9, 2008, at 3:26 PM, Eric Bergen wrote: > > > >> Hi, > >> > >> I've noticed that all the flush commands (except logs,=20 > ironically) are > >> written to the binary log. I thought the general idea of the binary > >> log was to only write things that modify data. I also=20 > noticed that the > >> global read lock only applies to tables and not the binary log. In > >> 5.0.51 a flush is written to the binlog even if there is a=20 > global read > >> lock. What are the guidelines for things being written to=20 > the binary > >> log? > >> > >> Thanks, > >> > >> Eric > >> > >> -- high performance mysql consulting. > >> http://provenscaling.com > > > > http://dev.mysql.com/doc/refman/5.0/en/flush.html says: > > > > " > > > > By default, FLUSH statements are written to the binary log.=20 > Such statements > > used on a MySQL server acting as a replication master will=20 > be replicated to > > replication slaves. Logging can be suppressed with the optional > > NO_WRITE_TO_BINLOG keyword or its alias LOCAL. > > > > ... > > > > Note > > FLUSH LOGS, FLUSH MASTER, FLUSH SLAVE, and FLUSH TABLES=20 > WITH READ LOCK are > > not written to the binary log in any case because they=20 > would cause problems > > if replicated to a slave. > > > > " > > > > -- > > Paul DuBois > > Sun Microsystems / MySQL Documentation Team > > Madison, Wisconsin, USA > > www.mysql.com > > > > >=20 >=20 >=20 > --=20 > high performance mysql consulting. > http://provenscaling.com >=20 > --=20 > MySQL Internals Mailing List > For list archives: http://lists.mysql.com/internals > To unsubscribe: =20 > http://lists.mysql.com/internals?unsub=3Drjames@stripped >=20 >=20