diff options
author | unknown <guilhem@mysql.com> | 2005-03-02 11:29:48 +0100 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2005-03-02 11:29:48 +0100 |
commit | d7e0784c65b44f3fa36f602e5f1d7579eed6b88b (patch) | |
tree | a63b632fd76de92b2e46c444930abb8d50336b2d /sql/set_var.cc | |
parent | 3087b2f1fde43ea192bcf7a2fa217aadc7bf7d3a (diff) | |
download | mariadb-git-d7e0784c65b44f3fa36f602e5f1d7579eed6b88b.tar.gz |
Fix for BUG#8325 "Deadlock in replication thread stops replication":
in slave SQL thread: if a transaction fails because of InnoDB deadlock or innodb_lock_wait_timeout exceeded,
optionally retry the transaction a certain number of times (new variable --slave_transaction_retries).
sql/mysql_priv.h:
new var slave_transaction_retries
sql/mysqld.cc:
new variable slave_transaction_retries. Plus fixing a typo.
sql/set_var.cc:
new global variable slave_transaction_retries (will be one per subslave, when we have multimaster).
sql/slave.cc:
Slave SQL thread: if a transaction fails because of InnoDB deadlock or innodb_lock_wait_timeout exceeded,
optionally retry the transaction a certain number of times (--slave_transaction_retries).
sql/slave.h:
new RELAY_LOG_INFO::trans_retries.
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index 29ebb2c8817..02b53f701cc 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -320,6 +320,8 @@ sys_var_bool_ptr sys_slave_compressed_protocol("slave_compressed_protocol", #ifdef HAVE_REPLICATION sys_var_long_ptr sys_slave_net_timeout("slave_net_timeout", &slave_net_timeout); +sys_var_long_ptr sys_slave_trans_retries("slave_transaction_retries", + &slave_trans_retries); #endif sys_var_long_ptr sys_slow_launch_time("slow_launch_time", &slow_launch_time); @@ -604,6 +606,7 @@ sys_var *sys_variables[]= #ifdef HAVE_REPLICATION &sys_slave_compressed_protocol, &sys_slave_net_timeout, + &sys_slave_trans_retries, &sys_slave_skip_counter, #endif &sys_slow_launch_time, @@ -855,6 +858,7 @@ struct show_var_st init_vars[]= { {"skip_show_database", (char*) &opt_skip_show_db, SHOW_BOOL}, #ifdef HAVE_REPLICATION {sys_slave_net_timeout.name,(char*) &sys_slave_net_timeout, SHOW_SYS}, + {sys_slave_trans_retries.name,(char*) &sys_slave_trans_retries, SHOW_SYS}, #endif {sys_slow_launch_time.name, (char*) &sys_slow_launch_time, SHOW_SYS}, #ifdef HAVE_SYS_UN_H |