On Wed, Apr 1, 2009 at 2:06 PM, Jeremy Zawodny <[email protected]> wrote:

> On Tue, Mar 31, 2009 at 8:47 PM, Jay Pipes <[email protected]> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> All,
>>
>> As I was hacking on the new replication code today, I noticed that
>> Drizzle (and MySQL 6) is passing through REPAIR, OPTIMIZE, and ANALYZE
>> TABLE statements as-is into the binlog and the replication stream.
>>
>> Oddly, CHECK TABLE is not replicated. ?.
>
>
> That doesn't seem odd at all to me.
>
> You use "CHECK TABLE" to see if a "REPAIR" is needed.  If you end up
> needing to run the repair on your master, you may or may not want to run it
> on your slaves (and have that control).  But I can't see a need to every
> blindly fire off "CHECK TABLE" commands at slaves.
>
> Can anyone else?
>

More specifically, CHECK TABLE doesn't do [significant?  any?] writes like
REPAIR, OPTIMIZE and ANALYZE do.  Although I'd argue that ANALYZE doesn't do
significant writes, because it's just updating the processor stats.


>
>
>
>> Question: Should any of these statements be replicated or sent to a
>> binary log?
>
>
> REPAIR, OPTIMIZE, and ANALYZE should.  If I want to run them on the master
> only, I can use "SET SQL_LOG_BIN=0" to get that (though I wish there was a
> cleaner syntax to disable for ONLY the next command).
>
>
>> Should Drizzle replicate any administrative commands at all?
>> Personally, I don't see the value in replicating them or storing them in
>> a recovery log either...but...input is always welcome!
>
>
> It's very useful to have that option as a sever admin (or someone who tries
> to tell them what to do).
>

It's also very useful for forensic purposes.  I've used the binary logs many
times to see when lots of data was deleted, or when a table was dropped.
There's no other place to get that kind of information (unless, heaven save
you, you have a general log).

To that end, I'd like to be able to log all write commands, but perhaps
options like binlog-ignore-db could just comment out the relevant data, or
else have some kind of "no really, log everything" forensic log.  In that
case, setting SQL_LOG_BIN=0 should log the commands, but have them commented
out.

-- 
- Sheeri K. Cabral

http://tinyurl.com/mysqlbook will take you to the Amazon.com page for my
upcoming book, "MySQL Administrator's Bible".
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to