summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorRamil Kalimullin <ramil@mysql.com>2010-11-18 13:40:57 +0300
committerRamil Kalimullin <ramil@mysql.com>2010-11-18 13:40:57 +0300
commite4d2fd35a7333fb6a9c92c6439b4c4123983ccde (patch)
treef67f4a6e2fd2e3828a0321bbd2b1c6ffc5f0d220 /sql/item_func.cc
parent1c94d43bbb60817252a87453d3a1d1a7d0f2a35c (diff)
parentc324624291a8c7cfbfcc728ce9fa86feb8d4e904 (diff)
downloadmariadb-git-e4d2fd35a7333fb6a9c92c6439b4c4123983ccde.tar.gz
Auto-merge from mysql-5.1-bugteam.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 3dbff43bb67..f8c6f48d8f5 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -157,7 +157,14 @@ Item_func::fix_fields(THD *thd, Item **ref)
used_tables_cache= not_null_tables_cache= 0;
const_item_cache=1;
- if (check_stack_overrun(thd, STACK_MIN_SIZE, buff))
+ /*
+ Use stack limit of STACK_MIN_SIZE * 2 since
+ on some platforms a recursive call to fix_fields
+ requires more than STACK_MIN_SIZE bytes (e.g. for
+ MIPS, it takes about 22kB to make one recursive
+ call to Item_func::fix_fields())
+ */
+ if (check_stack_overrun(thd, STACK_MIN_SIZE * 2, buff))
return TRUE; // Fatal error if flag is set!
if (arg_count)
{ // Print purify happy