Another try to fix slave timeouts

parent 46047734
......@@ -112,6 +112,8 @@ static my_bool is_NT(void)
}
#endif
extern ulong slave_net_timeout;
/*
** Create a named pipe connection
*/
......@@ -203,6 +205,7 @@ mc_mysql_init(MYSQL *mysql)
#ifdef __WIN__
mysql->options.connect_timeout=20;
#endif
mysql->net.timeout = slave_net_timeout;
return mysql;
}
......@@ -655,7 +658,7 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
goto error;
}
vio_keepalive(net->vio,TRUE);
net->timeout=slave_net_timeout;
/* Get version info */
mysql->protocol_version= PROTOCOL_VERSION; /* Assume this */
if ((pkt_length=mc_net_safe_read(mysql)) == packet_error)
......
......@@ -456,7 +456,7 @@ int fetch_nx_table(THD* thd, MASTER_INFO* mi)
nx_errno = ER_BAD_HOST_ERROR;
goto err;
}
mysql->net.timeout=slave_net_timeout;
safe_connect(thd, mysql, mi);
if (slave_killed(thd))
goto err;
......@@ -1312,7 +1312,7 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
goto err;
}
mysql->net.timeout=slave_net_timeout;
thd->proc_info = "connecting to master";
#ifndef DBUG_OFF
sql_print_error("Slave thread initialized");
......@@ -1331,7 +1331,8 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
}
connected:
mysql->net.timeout=slave_net_timeout;
while (!slave_killed(thd))
{
thd->proc_info = "Requesting binlog dump";
......
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