Commit 0889d8dc authored by unknown's avatar unknown

fixed sleep

bug on reconnect


sql/slave.cc:
  fixed sleep bug
parent 6f2d5616
...@@ -1481,9 +1481,10 @@ static int safe_reconnect(THD* thd, MYSQL* mysql, MASTER_INFO* mi) ...@@ -1481,9 +1481,10 @@ static int safe_reconnect(THD* thd, MYSQL* mysql, MASTER_INFO* mi)
%s, last_errno=%d, retry in %d sec", %s, last_errno=%d, retry in %d sec",
mc_mysql_error(mysql), last_errno=mc_mysql_errno(mysql), mc_mysql_error(mysql), last_errno=mc_mysql_errno(mysql),
mi->connect_retry); mi->connect_retry);
safe_sleep(thd, mi->connect_retry);
} }
if (err_count++ == master_retry_count) safe_sleep(thd, mi->connect_retry);
/* if master_retry_count is not set, keep trying until success */
if (master_retry_count && err_count++ == master_retry_count)
{ {
slave_was_killed=1; slave_was_killed=1;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment