1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

vio ssl structure renames (to get rid of ending _)

Added TCP/IP read/write timeout for windows
Check on windows if second server is started with same TCP/IP port


BitKeeper/deleted/.del-have_openssl_2.inc~8c9f1a45676b698f:
  Delete: mysql-test/include/have_openssl_2.inc
BitKeeper/deleted/.del-have_openssl_2.require~53bbdfc136fb514:
  Delete: mysql-test/r/have_openssl_2.require
BitKeeper/deleted/.del-openssl_2.test~f2dfa927f19d14f8:
  Delete: mysql-test/t/openssl_2.test
BitKeeper/etc/ignore:
  added libmysql/vio_priv.h libmysql_r/vio_priv.h
client/mysql.cc:
  vio ssl structure renames
include/violite.h:
  Cleanup violite.h interface (move things to vio_priv.h)
libmysql/Makefile.am:
  Use vio_priv.h
libmysql/Makefile.shared:
  Use vio_priv.h
libmysqld/lib_vio.c:
  Added timeout for windows
mysys/my_getopt.c:
  Indentaion cleanup
sql/item_cmpfunc.cc:
  Remove compiler warnings
sql/item_func.cc:
  Remove compiler warnings
sql/mini_client.cc:
  vio ssl structure renames
sql/mysqld.cc:
  Check on windows if second server is started with same TCP/IP port
sql/net_serv.cc:
  Add read/write timeouts for windows
sql/sql_acl.cc:
  vio ssl structure renames
sql/sql_show.cc:
  vio ssl structure renames
vio/vio.c:
  Added timeouts for windows
vio/viosocket.c:
  Added timeouts for windows
vio/viossl.c:
  Added timeouts for windows
  Cleaned up structure element names
vio/viosslfactories.c:
  Added timeouts for windows
  Cleaned up structure element names
This commit is contained in:
unknown
2003-08-27 02:51:39 +03:00
parent e5b3d521f5
commit 59806e1004
22 changed files with 264 additions and 266 deletions

View File

@ -1136,7 +1136,14 @@ static void server_init(void)
IPaddr.sin_family = AF_INET;
IPaddr.sin_addr.s_addr = my_bind_addr;
IPaddr.sin_port = (unsigned short) htons((unsigned short) mysql_port);
#ifndef __WIN__
/*
We should not use SO_REUSEADDR on windows as this would enable a
user to open two mysqld servers with the same TCP/IP port.
*/
(void) setsockopt(ip_sock,SOL_SOCKET,SO_REUSEADDR,(char*)&arg,sizeof(arg));
#endif
if (bind(ip_sock, my_reinterpret_cast(struct sockaddr *) (&IPaddr),
sizeof(IPaddr)) < 0)
{
@ -3011,6 +3018,12 @@ extern "C" pthread_handler_decl(handle_connections_sockets,
}
if (sock == unix_sock)
thd->host=(char*) localhost;
#ifdef __WIN__
/* Set default wait_timeout */
ulong wait_timeout= global_system_variables.net_wait_timeout * 1000;
(void) setsockopt(new_sock, SOL_SOCKET, SO_RCVTIMEO, (char*)&wait_timeout,
sizeof(wait_timeout));
#endif
create_new_thread(thd);
}