1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug #46807: subselect test fails on PB-2 with a crash

The check for stack overflow was independent of the size of the 
structure stored in the heap. 
Fixed by adding sizeof(PARAM) to the requested free heap size.
This commit is contained in:
Georgi Kodinov
2009-08-19 17:53:43 +03:00
parent 9a856bd483
commit 8dba7d18b4

View File

@ -2063,7 +2063,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
KEY *key_info; KEY *key_info;
PARAM param; PARAM param;
if (check_stack_overrun(thd, 2*STACK_MIN_SIZE, buff)) if (check_stack_overrun(thd, 2*STACK_MIN_SIZE + sizeof(PARAM), buff))
DBUG_RETURN(0); // Fatal error flag is set DBUG_RETURN(0); // Fatal error flag is set
/* set up parameter that is passed to all functions */ /* set up parameter that is passed to all functions */