Bug #26262 Add option to skip binary logging for mysqlcheck
Submitted: 10 Feb 2007 21:31 Modified: 17 May 2007 16:42
Reporter: Todd Farmer
Status: Closed
Category:Client Severity:S4 (Feature request)
Version: OS:Any
Assigned to: Timothy Smith Target Version:
Tags: bfsm_2007_03_15
Triage: D5 (Feature request)

[10 Feb 2007 21:31] Todd Farmer
Description:
The mysqlcheck utility provides a wrapper to several commands that allow an optional
NO_WRITE_TO_BINLOG option, however, mysqlcheck itself does not allow users to control
this.  The following all have NO_WRITE_TO_BINLOG options:

ANALYZE TABLE  (--analyze)
REPAIR TABLE (--repair)
OPTIMIZE TABLE  (--optimize)

Because mysqlcheck does not provide an option for the user to set this flag, the above
statements will be recorded to the binary log and passed to any replication slaves (which
may not be desirable).

How to repeat:
N/A

Suggested fix:
Modify mysqlcheck to take a command-line option to include the NO_WRITE_TO_BINLOG option
when generating ANALYZE, REPAIR or OPTIMIZE TABLE commands.
[24 Mar 2007 2:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/22852

ChangeSet@1.2507, 2007-03-23 19:27:40-06:00, tsmith@siva.hindu.god +2 -0
  Bug #26262: Add option to skip binary logging for mysqlcheck
  
  Add the --skip-write-binlog option, which adds NO_WRITE_TO_BINLOG
  to REPAIR, ANALYZE, and OPTIMIZE commands.
  
  Use this option when these SQL commands should not be sent to
  replication slaves, nor run when using the binary logs for recovery
  from backup
[28 Mar 2007 18:20] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/23179

ChangeSet@1.2507, 2007-03-28 10:19:10-06:00, tsmith@siva.hindu.god +2 -0
  Bug #26262: Add option to skip binary logging for mysqlcheck
  
  Add the --skip-write-binlog option, which adds NO_WRITE_TO_BINLOG
  to REPAIR, ANALYZE, and OPTIMIZE commands.
  
  Use this option when these SQL commands should not be sent to
  replication slaves, nor run when using the binary logs for recovery
  from backup
[6 Apr 2007 19:24] Bugs System
Pushed into 5.1.18-beta
[17 May 2007 16:42] Paul DuBois
Noted in 5.1.18 changelog.

Added --write-binlog option for mysqlcheck. This option is enabled by
default, but can be given as --skip-write-binlog to cause ANALYZE
TABLE, OPTIMIZE TABLE, and REPAIR TABLE statements generated by
mysqlcheck not to be written to the binary log.

Also updated mysqlcheck section.