diff options
author | Georgi Kodinov <joro@sun.com> | 2009-08-19 17:53:43 +0300 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-08-19 17:53:43 +0300 |
commit | 152943f39f487795f3d1d6910d1ee9f736feae44 (patch) | |
tree | 3dc7a8434612ede2a150510ad930a9c48e1be441 | |
parent | 8723e9d2269fec4d0a7dd4796deb53c0b2eab804 (diff) | |
download | mariadb-git-152943f39f487795f3d1d6910d1ee9f736feae44.tar.gz |
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.
-rw-r--r-- | sql/opt_range.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 32f9b0df4c0..d007009d62c 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -2063,7 +2063,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use, KEY *key_info; 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 /* set up parameter that is passed to all functions */ |