diff options
author | guilhem@mysql.com <> | 2003-08-23 16:53:04 +0200 |
---|---|---|
committer | guilhem@mysql.com <> | 2003-08-23 16:53:04 +0200 |
commit | 10811aba880f9f7db646a700cfc2065fbbfa8d0d (patch) | |
tree | 79a4c478549601c7f765106befea124cf558b4fd /sql/slave.cc | |
parent | 9676fdcbcdee38d96384cffac79439215015dc7e (diff) | |
download | mariadb-git-10811aba880f9f7db646a700cfc2065fbbfa8d0d.tar.gz |
* Fix for a potential bug:
when the SQL thread stops, set rli->inside_transaction to 0. This is needed if the user
later restarts replication from a completely different place where there are only autocommit
statements.
* Detect the case where the master died while flushing the binlog cache to the binlog
and stop with error. Cannot add a testcase for this in 4.0 (I tested it manually)
as the slave always runs with --skip-innodb.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 32ed228e119..10ec0050d05 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2260,7 +2260,7 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli) } else { - sql_print_error("\ + slave_print_error(rli, 0, "\ Could not parse relay log event entry. The possible reasons are: the master's \ binary log is corrupted (you can check this by running 'mysqlbinlog' on the \ binary log), the slave's relay log is corrupted (you can check this by running \ @@ -2695,6 +2695,12 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \ DBUG_ASSERT(rli->slave_running == 1); // tracking buffer overrun /* When master_pos_wait() wakes up it will check this and terminate */ rli->slave_running= 0; + /* + Going out of the transaction. Necessary to mark it, in case the user + restarts replication from a non-transactional statement (with CHANGE + MASTER). + */ + rli->inside_transaction= 0; /* Wake up master_pos_wait() */ pthread_mutex_unlock(&rli->data_lock); DBUG_PRINT("info",("Signaling possibly waiting master_pos_wait() functions")); |