diff options
author | unknown <jani@ua141d10.elisa.omakaista.fi> | 2006-01-12 17:47:58 +0200 |
---|---|---|
committer | unknown <jani@ua141d10.elisa.omakaista.fi> | 2006-01-12 17:47:58 +0200 |
commit | 1665d2370716a44acf7d35339019ad5b9e134b99 (patch) | |
tree | ed99abce17eba845952b63ae907b2af360071ce3 | |
parent | 0fa2fdb9be2ae0c296af43994557d4873e7405d0 (diff) | |
parent | 2946f9a64f664293010777e422e7b66058ce323a (diff) | |
download | mariadb-git-1665d2370716a44acf7d35339019ad5b9e134b99.tar.gz |
Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.0
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1
include/config-netware.h:
Auto merged
innobase/os/os0thread.c:
Auto merged
netware/mysqld_safe.c:
Merge from 4.0 to 4.1
sql/mysqld.cc:
Merge from 4.0 to 4.1
-rw-r--r-- | include/config-netware.h | 3 | ||||
-rw-r--r-- | innobase/os/os0thread.c | 9 | ||||
-rw-r--r-- | netware/mysqld_safe.c | 12 | ||||
-rw-r--r-- | sql/mysqld.cc | 6 |
4 files changed, 24 insertions, 6 deletions
diff --git a/include/config-netware.h b/include/config-netware.h index 74b3c3720e9..503c8bbef67 100644 --- a/include/config-netware.h +++ b/include/config-netware.h @@ -92,6 +92,9 @@ extern "C" { /* On NetWare, stack grows towards lower address*/ #define STACK_DIRECTION -1 +/* On NetWare, we need to set stack size for threads, otherwise default 16K is used */ +#define NW_THD_STACKSIZE 65536 + /* On NetWare, to fix the problem with the deletion of open files */ #define CANT_DELETE_OPEN_FILES 1 diff --git a/innobase/os/os0thread.c b/innobase/os/os0thread.c index 0278e3b2b66..e1a1119cfd4 100644 --- a/innobase/os/os0thread.c +++ b/innobase/os/os0thread.c @@ -148,6 +148,15 @@ os_thread_create( exit(1); } #endif +#ifdef __NETWARE__ + ret = pthread_attr_setstacksize(&attr, + (size_t) NW_THD_STACKSIZE); + if (ret) { + fprintf(stderr, + "InnoDB: Error: pthread_attr_setstacksize returned %d\n", ret); + exit(1); + } +#endif os_mutex_enter(os_sync_mutex); os_thread_count++; os_mutex_exit(os_sync_mutex); diff --git a/netware/mysqld_safe.c b/netware/mysqld_safe.c index a307b52bb7e..8e8f5111241 100644 --- a/netware/mysqld_safe.c +++ b/netware/mysqld_safe.c @@ -258,11 +258,11 @@ void finish_defaults() void read_defaults(arg_list_t *pal) {
arg_list_t al; - char defaults_file[PATH_MAX];
+ char defaults_file[PATH_MAX]; char mydefaults[PATH_MAX];
char line[PATH_MAX];
FILE *fp;
-
+ // defaults output file snprintf(defaults_file, PATH_MAX, "%s/bin/defaults.out", basedir); remove(defaults_file); @@ -270,7 +270,7 @@ void read_defaults(arg_list_t *pal) // mysqladmin file snprintf(mydefaults, PATH_MAX, "%s/bin/my_print_defaults", basedir);
- // args
+ // args init_args(&al); add_arg(&al, mydefaults); if (default_option[0]) @@ -279,11 +279,11 @@ void read_defaults(arg_list_t *pal) add_arg(&al, "server"); add_arg(&al, "mysqld_safe"); add_arg(&al, "safe_mysqld"); -
+ spawn(mydefaults, &al, TRUE, NULL, defaults_file, NULL); -
+ free_args(&al); -
+ // gather defaults if ((fp= fopen(defaults_file, "r")) != NULL) { diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 7b9e7d54d8f..cce48cc0d54 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3089,6 +3089,12 @@ int main(int argc, char **argv) } } #endif +#ifdef __NETWARE__ + /* Increasing stacksize of threads on NetWare */ + + pthread_attr_setstacksize(&connection_attrib, NW_THD_STACKSIZE); +#endif + thread_stack_min=thread_stack - STACK_MIN_SIZE; (void) thr_setconcurrency(concurrency); // 10 by default |