diff options
author | Konstantin Osipov <kostja@sun.com> | 2010-02-02 02:22:16 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2010-02-02 02:22:16 +0300 |
commit | 2c6015e8dc962bef8f353af920581d9b6bd7fd82 (patch) | |
tree | a19075577cf795c631e5ac514d6dac52880f9b86 /sql/slave.cc | |
parent | ca2b08e437d4c5538b40aa61fa44f68ddd74bc42 (diff) | |
parent | 92630be0ee81604ec47cb8c7e9ab016e5449dc4d (diff) | |
download | mariadb-git-2c6015e8dc962bef8f353af920581d9b6bd7fd82.tar.gz |
Merge next-mr -> next-4284.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index ca72aaea69a..884692cc98d 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1207,6 +1207,8 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi) mi->clock_diff_with_master= (long) (time((time_t*) 0) - strtoul(master_row[0], 0, 10)); } + else if (check_io_slave_killed(mi->io_thd, mi, NULL)) + goto slave_killed_err; else if (is_network_error(mysql_errno(mysql))) { mi->report(WARNING_LEVEL, mysql_errno(mysql), @@ -1259,7 +1261,9 @@ not always make sense; please check the manual before using it)."; } else if (mysql_errno(mysql)) { - if (is_network_error(mysql_errno(mysql))) + if (check_io_slave_killed(mi->io_thd, mi, NULL)) + goto slave_killed_err; + else if (is_network_error(mysql_errno(mysql))) { mi->report(WARNING_LEVEL, mysql_errno(mysql), "Get master SERVER_ID failed with error: %s", mysql_error(mysql)); @@ -1330,6 +1334,8 @@ be equal for the Statement-format replication to work"; goto err; } } + else if (check_io_slave_killed(mi->io_thd, mi, NULL)) + goto slave_killed_err; else if (is_network_error(mysql_errno(mysql))) { mi->report(WARNING_LEVEL, mysql_errno(mysql), @@ -1391,6 +1397,8 @@ be equal for the Statement-format replication to work"; goto err; } } + else if (check_io_slave_killed(mi->io_thd, mi, NULL)) + goto slave_killed_err; else if (is_network_error(mysql_errno(mysql))) { mi->report(WARNING_LEVEL, mysql_errno(mysql), @@ -1454,6 +1462,11 @@ network_err: if (master_res) mysql_free_result(master_res); DBUG_RETURN(2); + +slave_killed_err: + if (master_res) + mysql_free_result(master_res); + DBUG_RETURN(2); } static bool wait_for_relay_log_space(Relay_log_info* rli) @@ -2681,7 +2694,7 @@ connected: if (ret == 1) /* Fatal error */ goto err; - + if (ret == 2) { if (check_io_slave_killed(mi->io_thd, mi, "Slave I/O thread killed" |