diff options
author | monty@mashka.mysql.fi <> | 2003-03-11 00:39:55 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2003-03-11 00:39:55 +0200 |
commit | ced6463686b6adc44fe43b2f954e35c4bb04784d (patch) | |
tree | 2ba2e51d4400c31051b577d30502e75a09995630 /sql/mysqld.cc | |
parent | 9c8838749f11af68238d415f99763787e32d5f7c (diff) | |
parent | 2d09c5bf9c1e6858569f5221050f06c7a3871aa0 (diff) | |
download | mariadb-git-ced6463686b6adc44fe43b2f954e35c4bb04784d.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mashka.mysql.fi:/home/my/mysql-4.1
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 62b3601a5ed..754d24bef8e 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2039,6 +2039,20 @@ static int init_common_variables(const char *conf_file_name, int argc, DBUG_PRINT("info",("%s Ver %s for %s on %s\n",my_progname, server_version, SYSTEM_TYPE,MACHINE_TYPE)); +#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE + { + /* Retrieve used stack size; Needed for checking stack overflows */ + size_t stack_size; + pthread_attr_getstacksize(&connection_attrib, &stack_size); + if (global_system_variables.log_warnings && stack_size != thread_stack) + { + sql_print_error("Warning: Asked for %ld thread stack, but got %ld", + thread_stack, stack_size); + thread_stack= stack_size; + } + } +#endif + #if defined( SET_RLIMIT_NOFILE) || defined( OS2) /* connections and databases needs lots of files */ { @@ -2349,19 +2363,6 @@ int main(int argc, char **argv) if (!(opt_specialflag & SPECIAL_NO_PRIOR)) my_pthread_setprio(pthread_self(),CONNECT_PRIOR); pthread_attr_setstacksize(&connection_attrib,thread_stack); -#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE - { - /* Retrieve used stack size; Needed for checking stack overflows */ - size_t stack_size; - pthread_attr_getstacksize(&connection_attrib, &stack_size); - if (global_system_variables.log_warnings && stack_size != thread_stack) - { - sql_print_error("Warning: Asked for %ld thread stack, but got %ld", - thread_stack, stack_size); - thread_stack= stack_size; - } - } -#endif (void) thr_setconcurrency(concurrency); // 10 by default select_thread=pthread_self(); |