summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-06-28 18:22:29 -0600
committerunknown <sasha@mysql.sashanet.com>2001-06-28 18:22:29 -0600
commitc7e200cdd8fcb0429442f6441e42500fea8f899c (patch)
treecb4a8d96c0034fc1d1761a36370587c6845aae72 /sql/slave.cc
parent91239689e55a7cf8cc245f8311ed6e59a4d195b1 (diff)
downloadmariadb-git-c7e200cdd8fcb0429442f6441e42500fea8f899c.tar.gz
fixed message in post-commit trigger
added debugging options to master to behave sporadically, and a test case to make sure the slave can deal with it BitKeeper/triggers/post-commit: fixed message sql/mysqld.cc: added debugging options to force the master to occasionally break replication sql/slave.cc: cosmetic change to improve readability sql/sql_repl.cc: support for --sporadic-binlog-dump-fail and --max-binlog-dump-events sql/sql_repl.h: support for --sporadic-binlog-dump-fail and --max-binlog-dump-events
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index a768e8494a0..9b9a4041616 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -1236,6 +1236,8 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
goto err;
}
+connected:
+
while (!slave_killed(thd))
{
thd->proc_info = "Requesting binlog dump";
@@ -1278,10 +1280,9 @@ try again, log '%s' at postion %s", RPL_LOG_NAME,
goto err;
}
- continue;
+ goto connected;
}
-
while(!slave_killed(thd))
{
thd->proc_info = "Reading master update";
@@ -1291,7 +1292,6 @@ try again, log '%s' at postion %s", RPL_LOG_NAME,
sql_print_error("Slave thread killed while reading event");
goto err;
}
-
if (event_len == packet_error)
{
@@ -1329,8 +1329,9 @@ reconnecting to retry, log '%s' position %s", RPL_LOG_NAME,
reconnect done to recover from failed read");
goto err;
}
- break;
- }
+
+ goto connected;
+ } // if(event_len == packet_error)
thd->proc_info = "Processing master log event";
if(exec_event(thd, &mysql->net, &glob_mi, event_len))
@@ -1373,9 +1374,8 @@ the slave thread with \"mysqladmin start-slave\". We stopped at log \
events_till_disconnect++;
}
#endif
-
- }
- }
+ } // while(!slave_killed(thd)) - read/exec loop
+ } // while(!slave_killed(thd)) - slave loop
// error = 0;
err: