diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2009-10-16 19:44:58 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2009-10-16 19:44:58 +0400 |
commit | 52cb2344606f1f0c151fc612862820c0863cf90e (patch) | |
tree | a664a8fd779b901c8beea84557c3f13bce1aeef3 | |
parent | 26c31ed688a1abb52d8a6fb40602eb2e5d3decb0 (diff) | |
download | mariadb-git-52cb2344606f1f0c151fc612862820c0863cf90e.tar.gz |
MBUG#452116: MariaDB: mysql_install_db causes server segfault
- Increase thread_stack_size on 64-bit platforms to 240K, so that
it can accomodate the HA_CHECK structure which is 130K.
-rw-r--r-- | mysys/my_init.c | 3 | ||||
-rw-r--r-- | sql/mysqld.cc | 2 | ||||
-rw-r--r-- | support-files/my-innodb-heavy-4G.cnf.sh | 2 | ||||
-rw-r--r-- | support-files/my-small.cnf.sh | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/mysys/my_init.c b/mysys/my_init.c index 0e1a8c9a4aa..e7ab9ba7a1f 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -42,7 +42,8 @@ static void netware_init(); my_bool my_init_done= 0; uint mysys_usage_id= 0; /* Incremented for each my_init() */ -ulong my_thread_stack_size= 65536; + +ulong my_thread_stack_size= (sizeof(void*) <= 4)? 65536: ((256-16)*1024); static ulong atoi_octal(const char *str) { diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 7abe0af68f5..f6e77158d4c 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -7170,7 +7170,7 @@ The minimum value for this variable is 4096.", {"thread_stack", OPT_THREAD_STACK, "The stack size for each thread.", (uchar**) &my_thread_stack_size, (uchar**) &my_thread_stack_size, 0, GET_ULONG, REQUIRED_ARG,DEFAULT_THREAD_STACK, - 1024L*128L, (longlong) ULONG_MAX, 0, 1024, 0}, + (sizeof(void*)<=4)?1024L*128L: ((256-16)*1024L), (longlong) ULONG_MAX, 0, 1024, 0}, { "time_format", OPT_TIME_FORMAT, "The TIME format (for future).", (uchar**) &opt_date_time_formats[MYSQL_TIMESTAMP_TIME], diff --git a/support-files/my-innodb-heavy-4G.cnf.sh b/support-files/my-innodb-heavy-4G.cnf.sh index e9390a5b9e8..305a6ee3006 100644 --- a/support-files/my-innodb-heavy-4G.cnf.sh +++ b/support-files/my-innodb-heavy-4G.cnf.sh @@ -174,7 +174,7 @@ default-storage-engine = MYISAM # memory, while if you use your own stack hungry UDF functions or your # OS requires more stack for some operations, you might need to set this # to a higher value. -thread_stack = 192K +thread_stack = 240K # Set the default transaction isolation level. Levels available are: # READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, SERIALIZABLE diff --git a/support-files/my-small.cnf.sh b/support-files/my-small.cnf.sh index 3bfa08d0bd1..7dce9e60ed9 100644 --- a/support-files/my-small.cnf.sh +++ b/support-files/my-small.cnf.sh @@ -34,7 +34,7 @@ sort_buffer_size = 64K read_buffer_size = 256K read_rnd_buffer_size = 256K net_buffer_length = 2K -thread_stack = 128K +thread_stack = 240K # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. |