Commit 7f32453d authored by unknown's avatar unknown

merge with 4.0.11 to get fix for thread stack

parents 2eb507a9 02f400c5
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2378,6 +2378,17 @@ int main(int argc, char **argv) ...@@ -2378,6 +2378,17 @@ int main(int argc, char **argv)
if (init_thread_environment()) if (init_thread_environment())
unireg_abort(1); unireg_abort(1);
pthread_attr_setstacksize(&connection_attrib,thread_stack); pthread_attr_setstacksize(&connection_attrib,thread_stack);
{
/* Retrieve used stack size; Needed for checking stack overflows */
size_t stack_size;
pthread_attr_getstacksize(&connection_attrib, &stack_size);
if (global_system_variables.log_warnings && stack_size != thread_stack)
{
sql_print_error("Warning: Asked for %ld thread stack, but got %ld",
thread_stack, stack_size);
thread_stack= stack_size;
}
}
(void) thr_setconcurrency(concurrency); // 10 by default (void) thr_setconcurrency(concurrency); // 10 by default
select_thread=pthread_self(); select_thread=pthread_self();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment