Commit 393bd5cf authored by Sinisa@sinisa.nasamreza.org's avatar Sinisa@sinisa.nasamreza.org
Browse files

Another try to fix slave timeouts

parent 46047734
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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)
+4 −3
Original line number Diff line number Diff line
@@ -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");
@@ -1332,6 +1332,7 @@ 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";