On Tue, May 28, 2013 at 4:56 AM, Kristian Nielsen <knielsen@knielsen-hq.org> wrote:
> 4) Probably with a separate flag we want to prohibit any writes to binlog on
> the slave except from the slave thread(s), i.e. whenever MASTER_HOST is
> configured server works as if sql_log_bin = 0 globally except for the slave
> thread(s) which work as if sql_log_bin = 1 and SELECT @@global.sql_log_bin
> still returns 1.

Can you elaborate exactly what semantics you have in mind for this new option?
And why a new option is needed/how it differs from the already existing
read-only and sql-log-bin options?

It sounds to me what you want is simply to be able to start the server with
--sql-log-bin=0 and still have the slave sql thread log its events to the
binlog (if --log-slave-updates=1)? I would expect that to work already, but
maybe there is a bug (that we could fix), or maybe you had something else in
mind?

Hm... It looks like this should work. I thought that setting @@global.sql_log_bin to 0 will prohibit slave thread from writing to binlog too. I've tested now and it still writes. So probably this will be good enough.
We won't be protected from SUPER "accidentally" setting sql_log_bin to 1, but that shouldn't be a big deal...


Thank you,
Pavel