From: magnus.blaudd Date: November 18 2011 9:27am Subject: bzr push into mysql-5.5-cluster branch (magnus.blaudd:3651 to 3652) WL#5881 List-Archive: http://lists.mysql.com/commits/142033 Message-Id: <201111180927.pAI9R9oa014569@acsmt356.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3652 magnus.blaudd@stripped 2011-11-18 WL#5881 - revert to original functionality of "slave_allow_batching" thus allowing it to be changed also while slave sql thread is running - prefix the option variable with opt_ - move the code together with the other slave variables(thus inside HAVE_REPLICATION) modified: sql/log_event.cc sql/mysqld.h sql/sys_vars.cc 3651 Ole John Aske 2011-11-16 [merge] Merge 7.0-spj-ss -> 5.5-cluster added: mysql-test/suite/ndb/t/ndb_join_pushdown_default.test renamed: mysql-test/suite/ndb/r/ndb_join_pushdown.result => mysql-test/suite/ndb/r/ndb_join_pushdown_default.result mysql-test/suite/ndb/t/ndb_join_pushdown.test => mysql-test/suite/ndb/t/ndb_join_pushdown.inc modified: mysql-test/suite/ndb/r/ndb_condition_pushdown.result mysql-test/suite/ndb/t/ndb_condition_pushdown.test sql/ha_ndbcluster.cc mysql-test/suite/ndb/r/ndb_join_pushdown_default.result mysql-test/suite/ndb/t/ndb_join_pushdown.inc === modified file 'sql/log_event.cc' --- a/sql/log_event.cc 2011-11-15 14:45:16 +0000 +++ b/sql/log_event.cc 2011-11-18 09:24:36 +0000 @@ -7960,7 +7960,7 @@ int Rows_log_event::do_apply_event(Relay Note that unlike the other thd options set here, this one comes from a global, and not from the incoming event. */ - if (slave_allow_batching) + if (opt_slave_allow_batching) thd->variables.option_bits|= OPTION_ALLOW_BATCH; else thd->variables.option_bits&= ~OPTION_ALLOW_BATCH; === modified file 'sql/mysqld.h' --- a/sql/mysqld.h 2011-11-15 13:32:16 +0000 +++ b/sql/mysqld.h 2011-11-18 09:24:36 +0000 @@ -166,7 +166,9 @@ extern ulong slow_launch_threads, slow_l extern ulong table_cache_size, table_def_size; extern MYSQL_PLUGIN_IMPORT ulong max_connections; extern ulong max_connect_errors, connect_timeout; -extern my_bool slave_allow_batching; +#ifndef MCP_WL3733 +extern my_bool opt_slave_allow_batching; +#endif extern my_bool allow_slave_start; extern LEX_CSTRING reason_slave_blocked; extern ulong slave_trans_retries; === modified file 'sql/sys_vars.cc' --- a/sql/sys_vars.cc 2011-11-15 14:25:58 +0000 +++ b/sql/sys_vars.cc 2011-11-18 09:24:36 +0000 @@ -2470,40 +2470,6 @@ static Sys_var_ulong Sys_profiling_histo VALID_RANGE(0, 100), DEFAULT(15), BLOCK_SIZE(1)); #endif -#ifndef MCP_WL3733 -#ifndef EMBEDDED_LIBRARY -my_bool slave_allow_batching; - -/* - Take Active MI lock while checking/updating slave_allow_batching - to give atomicity w.r.t. slave state changes -*/ -static PolyLock_mutex PLock_active_mi(&LOCK_active_mi); - -static bool slave_allow_batching_check(sys_var *self, THD *thd, set_var *var) -{ - /* Only allow a change if the slave SQL thread is currently stopped */ - bool slave_sql_running = active_mi->rli.slave_running; - - if (slave_sql_running) - { - my_error(ER_SLAVE_MUST_STOP, MYF(0)); - return true; - } - - return false; -} - -static Sys_var_mybool Sys_slave_allow_batching( - "slave_allow_batching", "Allow slave to batch requests", - GLOBAL_VAR(slave_allow_batching), - CMD_LINE(OPT_ARG), DEFAULT(FALSE), - &PLock_active_mi, - NOT_IN_BINLOG, - ON_CHECK(slave_allow_batching_check)); -#endif -#endif - static Sys_var_harows Sys_select_limit( "sql_select_limit", "The maximum number of rows to return from SELECT statements", @@ -3041,6 +3007,14 @@ static Sys_var_mybool Sys_relay_log_reco "processed", GLOBAL_VAR(relay_log_recovery), CMD_LINE(OPT_ARG), DEFAULT(FALSE)); +#ifndef MCP_WL3733 +my_bool opt_slave_allow_batching; +static Sys_var_mybool Sys_slave_allow_batching( + "slave_allow_batching", "Allow slave to batch requests", + GLOBAL_VAR(opt_slave_allow_batching), + CMD_LINE(OPT_ARG), DEFAULT(FALSE)); +#endif + static Sys_var_charptr Sys_slave_load_tmpdir( "slave_load_tmpdir", "The location where the slave should put " "its temporary files when replicating a LOAD DATA INFILE command", No bundle (reason: useless for push emails).