1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix for stack size checking on Solaris.

This commit is contained in:
unknown
2003-03-26 14:51:22 +02:00
parent 10b0edf399
commit 221dfec1a4

View File

@ -2102,9 +2102,10 @@ int main(int argc, char **argv)
#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE #ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE
{ {
/* Retrieve used stack size; Needed for checking stack overflows */ /* 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); 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) if (global_system_variables.log_warnings)
sql_print_error("Warning: Asked for %ld thread stack, but got %ld", sql_print_error("Warning: Asked for %ld thread stack, but got %ld",