diff options
author | unknown <monty@mashka.mysql.fi> | 2003-09-11 20:31:40 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-09-11 20:31:40 +0300 |
commit | 41824a35338012ff8196eb975f961d5e0f0e2a22 (patch) | |
tree | 1475a169c541e6b7aedb36103dd255fe52fc0517 /sql/mysqld.cc | |
parent | 07bc35e1d024e5e3b81b131a47878510f0521609 (diff) | |
parent | d32bdcb1bfc274476cdd945e66e00f3ec31253c3 (diff) | |
download | mariadb-git-41824a35338012ff8196eb975f961d5e0f0e2a22.tar.gz |
merge with 4.1 tree
client/mysqltest.c:
Auto merged
include/mysql.h:
Auto merged
libmysql/errmsg.c:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/share/portuguese/errmsg.txt:
Auto merged
sql/share/spanish/errmsg.txt:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
tests/client_test.c:
Auto merged
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 2d82454ad6d..b014929f480 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -210,6 +210,7 @@ const char *sql_mode_names[] = { "REAL_AS_FLOAT", "PIPES_AS_CONCAT", "ANSI_QUOTES", "IGNORE_SPACE", "?", "ONLY_FULL_GROUP_BY", "NO_UNSIGNED_SUBTRACTION", + "NO_DIR_IN_CREATE", "POSTGRESQL", "ORACLE", "MSSQL", "DB2", "SAPDB", "NO_KEY_OPTIONS", "NO_TABLE_OPTIONS", "NO_FIELD_OPTIONS", "MYSQL323", "MYSQL40", "ANSI", "NO_AUTO_VALUE_ON_ZERO", NullS @@ -1122,7 +1123,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) mysqld_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 /* __WIN__ */ if (bind(ip_sock, my_reinterpret_cast(struct sockaddr *) (&IPaddr), sizeof(IPaddr)) < 0) { @@ -2053,7 +2061,10 @@ static int init_common_variables(const char *conf_file_name, int argc, max_connections,table_cache_size)); sql_print_error("Warning: Changed limits: max_connections: %ld table_cache: %ld",max_connections,table_cache_size); } + open_files_limit= files; } +#else + open_files_limit= 0; /* Can't set or detect limit */ #endif unireg_init(opt_specialflag); /* Set up extern variabels */ init_errmessage(); /* Read error messages from file */ @@ -3101,6 +3112,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); } @@ -3806,7 +3823,7 @@ master-ssl", (gptr*) &master_ssl_cipher, (gptr*) &master_ssl_capath, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, {"myisam-recover", OPT_MYISAM_RECOVER, - "Syntax: myisam-recover[=option[,option...]], where option can be DEFAULT, BACKUP or FORCE.", + "Syntax: myisam-recover[=option[,option...]], where option can be DEFAULT, BACKUP, FORCE or QUICK.", (gptr*) &myisam_recover_options_str, (gptr*) &myisam_recover_options_str, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, {"memlock", OPT_MEMLOCK, "Lock mysqld in memory.", (gptr*) &locked_in_memory, @@ -4197,7 +4214,7 @@ replicating a LOAD DATA INFILE command.", "Max packetlength to send/receive from to server.", (gptr*) &global_system_variables.max_allowed_packet, (gptr*) &max_system_variables.max_allowed_packet, 0, GET_ULONG, - REQUIRED_ARG, 1024*1024L, 80, 1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0}, + REQUIRED_ARG, 1024*1024L, 1024, 1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0}, {"max_binlog_cache_size", OPT_MAX_BINLOG_CACHE_SIZE, "Can be used to restrict the total size used to cache a multi-transaction query.", (gptr*) &max_binlog_cache_size, (gptr*) &max_binlog_cache_size, 0, @@ -5565,6 +5582,19 @@ static void fix_paths(void) } +/* + set how many open files we want to be able to handle + + SYNOPSIS + set_maximum_open_files() + max_file_limit Files to open + + NOTES + The request may not fulfilled becasue of system limitations + + RETURN + Files available to open +*/ #ifdef SET_RLIMIT_NOFILE static uint set_maximum_open_files(uint max_file_limit) |