1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Auto-merge from mysql-next-mr-summit0.3.

This commit is contained in:
Alexander Nozdrin
2009-12-16 21:50:45 +03:00
22 changed files with 445 additions and 105 deletions

View File

@ -1206,6 +1206,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),
@ -1258,7 +1260,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));
@ -1329,6 +1333,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),
@ -1390,6 +1396,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),
@ -1453,6 +1461,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)
@ -2676,7 +2689,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"