diff options
author | Alfranio Correia <alfranio.correia@sun.com> | 2009-07-06 09:02:14 +0100 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@sun.com> | 2009-07-06 09:02:14 +0100 |
commit | 8ba57fa3c90ed17ed54e487e1f05fe42ba550d6e (patch) | |
tree | 28e07e2f08480564a17d6a9697e39cd2781feaea /sql/slave.cc | |
parent | 1621a97fd447a9786d6abbaeffafb65dcc60d6b3 (diff) | |
download | mariadb-git-8ba57fa3c90ed17ed54e487e1f05fe42ba550d6e.tar.gz |
BUG#44581 Slave stops when transaction with non-transactional table gets lock wait
timeout
In STMT and MIXED modes, a statement that changes both non-transactional and
transactional tables must be written to the binary log whenever there are
changes to non-transactional tables. This means that the statement gets into the
binary log even when the changes to the transactional tables fail. In particular
, in the presence of a failure such statement is annotated with the error number
and wrapped in a begin/rollback. On the slave, while applying the statement, it
is expected the same failure and the rollback prevents the transactional changes
to be persisted.
Unfortunately, statements that fail due to concurrency issues (e.g. deadlocks,
timeouts) are logged in the same way causing the slave to stop as the statements
are applied sequentially by the SQL Thread. To fix this bug, we automatically
ignore concurrency failures on the slave. Specifically, the following failures
are ignored: ER_LOCK_WAIT_TIMEOUT, ER_LOCK_DEADLOCK and ER_XA_RBDEADLOCK.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 0270db9253d..81be7064f89 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1884,25 +1884,6 @@ static ulong read_event(MYSQL* mysql, Master_info *mi, bool* suppress_warnings) DBUG_RETURN(len - 1); } - -int check_expected_error(THD* thd, Relay_log_info const *rli, - int expected_error) -{ - DBUG_ENTER("check_expected_error"); - - switch (expected_error) { - case ER_NET_READ_ERROR: - case ER_NET_ERROR_ON_WRITE: - case ER_QUERY_INTERRUPTED: - case ER_SERVER_SHUTDOWN: - case ER_NEW_ABORTING_CONNECTION: - DBUG_RETURN(1); - default: - DBUG_RETURN(0); - } -} - - /* Check if the current error is of temporary nature of not. Some errors are temporary in nature, such as |