summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-03-27 13:54:22 +0200
committerunknown <monty@mashka.mysql.fi>2003-03-27 13:54:22 +0200
commite61bbc45ecb38e28f4e18d9d2a8d941bb722441b (patch)
tree20b1d57e1acb3e929c99953595bbb275733e95a4 /sql
parent2e6c3197a931362d58c987098664783b2b8b54bf (diff)
parent221dfec1a4fb2a7208d9ae88eaa151857e95486c (diff)
downloadmariadb-git-e61bbc45ecb38e28f4e18d9d2a8d941bb722441b.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0 sql/mysqld.cc: Auto merged
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 7920a954eeb..c407fccf00b 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2102,12 +2102,14 @@ 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 (global_system_variables.log_warnings && 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)
{
- sql_print_error("Warning: Asked for %ld thread stack, but got %ld",
- thread_stack, stack_size);
+ if (global_system_variables.log_warnings)
+ sql_print_error("Warning: Asked for %ld thread stack, but got %ld",
+ thread_stack, stack_size);
thread_stack= stack_size;
}
}