From: Date: March 24 2007 2:27am Subject: bk commit into 5.1 tree (tsmith:1.2507) BUG#26262 List-Archive: http://lists.mysql.com/commits/22852 X-Bug: 26262 Message-Id: <20070324012759.72229D86BA@siva.hindu.god> Below is the list of changes that have just been committed into a local 5.1 repository of tsmith. When tsmith does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-03-23 19:27:40-06:00, tsmith@stripped +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 client/client_priv.h@stripped, 2007-03-23 19:27:34-06:00, tsmith@stripped +1 -1 Add OPT_WRITE_BINLOG client option client/mysqlcheck.c@stripped, 2007-03-23 19:27:34-06:00, tsmith@stripped +9 -4 Add --skip-write-binlog option, which adds NO_WRITE_TO_BINLOG to REPAIR, ANALYZE, and OPTIMIZE commands. # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: tsmith # Host: siva.hindu.god # Root: /home/tsmith/m/bk/maint/bmisc/51 --- 1.61/client/mysqlcheck.c 2006-12-23 12:19:43 -07:00 +++ 1.62/client/mysqlcheck.c 2007-03-23 19:27:34 -06:00 @@ -34,7 +34,8 @@ opt_medium_check = 0, opt_quick = 0, opt_all_in_1 = 0, opt_silent = 0, opt_auto_repair = 0, ignore_errors = 0, tty_password= 0, opt_frm= 0, info_flag= 0, - opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0; + opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0, + opt_write_binlog = 1; static uint verbose = 0, opt_mysql_port=0; static my_string opt_mysql_unix_port = 0; static char *opt_password = 0, *current_user = 0, @@ -123,6 +124,10 @@ {"medium-check", 'm', "Faster than extended-check, but only finds 99.99 percent of all errors. Should be good enough for most cases.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"write-binlog", OPT_WRITE_BINLOG, + "Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. Enabled by default; use --skip-write-binlog when commands should not be sent to replication slaves.", + (gptr*) &opt_write_binlog, (gptr*) &opt_write_binlog, 0, GET_BOOL, NO_ARG, + 1, 0, 0, 0, 0, 0}, {"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"password", 'p', @@ -598,16 +603,16 @@ if (opt_upgrade) end = strmov(end, " FOR UPGRADE"); break; case DO_REPAIR: - op = "REPAIR"; + op = (opt_write_binlog) ? "REPAIR" : "REPAIR NO_WRITE_TO_BINLOG"; if (opt_quick) end = strmov(end, " QUICK"); if (opt_extended) end = strmov(end, " EXTENDED"); if (opt_frm) end = strmov(end, " USE_FRM"); break; case DO_ANALYZE: - op = "ANALYZE"; + op = (opt_write_binlog) ? "ANALYZE" : "ANALYZE NO_WRITE_TO_BINLOG"; break; case DO_OPTIMIZE: - op = "OPTIMIZE"; + op = (opt_write_binlog) ? "OPTIMIZE" : "OPTIMIZE NO_WRITE_TO_BINLOG"; break; case DO_UPGRADE: return fix_object_name("TABLE", tables); --- 1.63/client/client_priv.h 2007-01-29 14:17:27 -07:00 +++ 1.64/client/client_priv.h 2007-03-23 19:27:34 -06:00 @@ -60,5 +60,5 @@ OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE, OPT_SLAP_AUTO_GENERATE_WRITE_NUM, OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT, OPT_SERVER_ID, OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT, - OPT_DEBUG_INFO, OPT_COLUMN_TYPES + OPT_DEBUG_INFO, OPT_COLUMN_TYPES, OPT_WRITE_BINLOG };