-
unknown authored
This only showed up on two known platforms, both ia64 (one HP-UX and one Linux wich icc). For some reason, they only get half the stack size they are supposed to have, which makes deep SP recursion overrun the stack before check_stack_overrun() is triggered. Also made som minor fixes in the check_stack_overrun() definition, supporting variable margins. No test case added, but the reason for the bug report was a failed existing test case on these machines, which now works. sql/item_cmpfunc.cc: Adopted call to new check_stack_overrun() definition. sql/item_func.cc: Adopted calls to new check_stack_overrun() definition. sql/item_subselect.cc: Adopted call to new check_stack_overrun() definition. sql/mysql_priv.h: Changed definition of check_stack_overrun(), thread_stack_min variable no longer needed. sql/mysqld.cc: thread_stack_min variable no longer needed (with variable margin arg. to check_thread_overrun()). On (at least some) ia64 machines, it seems we only get half the requested stack in reality, so deep SP recursion crashes before the thread overrun check is triggered. We work around this by requesting twice the stack requested to get expected size. sql/sp_head.cc: Adopted call to new check_stack_overrun() definition, and use a wider margin execution. sql/sql_parse.cc: Modified check_stack_overrun() definition. Removed unused arg that didn't sever any purpose, and added a 'margin' argument to support different margins for different callrers. sql/table.cc: Adopted call to new check_stack_overrun() definition.
d24466e1