summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-03-26 14:51:22 +0200
committerunknown <monty@mashka.mysql.fi>2003-03-26 14:51:22 +0200
commit221dfec1a4fb2a7208d9ae88eaa151857e95486c (patch)
tree53895b9aac6d16e6ab8f1b03a069a3f61f814639
parent10b0edf3990ea4e72d2c8ef297394d6b3da35965 (diff)
downloadmariadb-git-221dfec1a4fb2a7208d9ae88eaa151857e95486c.tar.gz
Fix for stack size checking on Solaris.
-rw-r--r--sql/mysqld.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 19b7ef1ad62..2b673e68bcd 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2102,9 +2102,10 @@ int main(int argc, char **argv)
#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE
{
/* Retrieve used stack size; Needed for checking stack overflows */
- size_t stack_size;
+ size_t stack_size= 0;
pthread_attr_getstacksize(&connection_attrib, &stack_size);
- if (stack_size != thread_stack)
+ /* We must check if stack_size = 0 as Solaris 2.9 can return 0 here */
+ if (stack_size && stack_size != thread_stack)
{
if (global_system_variables.log_warnings)
sql_print_error("Warning: Asked for %ld thread stack, but got %ld",