Bug #48550 Thread_stack_size really has a dynamic not static default
Submitted: 4 Nov 2009 22:13 Modified: 11 Jan 2010 19:42
Reporter: Arjen Lentz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:any OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[4 Nov 2009 22:13] Arjen Lentz
Description:
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_thread_stack

Says 192K is the default for thread_stack_size. This appears to be untrue.
In the source, the default stack size is actually calculated, effectively based on the architecture. A 64bit OS needs a bigger stack.

How to repeat:
check source (check with a dev to find it ;-)

Suggested fix:
fix docs!
[4 Nov 2009 22:44] MySQL Verification Team
Thank you for the bug report.
[11 Jan 2010 19:26] Paul DuBois
Looks like 256K for 64-bit systems. my_pthread.h

#ifndef DEFAULT_THREAD_STACK
#if SIZEOF_CHARP > 4
/*
  MySQL can survive with 32K, but some glibc libraries require > 128K stack
  To resolve hostnames. Also recursive stored procedures needs stack.
*/
#define DEFAULT_THREAD_STACK    (256*1024L)
#else
#define DEFAULT_THREAD_STACK    (192*1024)
#endif
#endif
[11 Jan 2010 19:42] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.