summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorgkodinov/kgeorge@magare.gmz <>2007-11-23 12:26:19 +0200
committergkodinov/kgeorge@magare.gmz <>2007-11-23 12:26:19 +0200
commit784b5d7b724acec0ada82587ffa7b5ac7144ced7 (patch)
tree03241a63158659c5a63a0034f2f6c4a7a6b6c605 /sql/opt_range.cc
parent5f1966d1726a81a3951a365a3dfca68d869c1e7b (diff)
parent3f163915bf4d7006f94a8c94814b7fdae3de03ad (diff)
downloadmariadb-git-784b5d7b724acec0ada82587ffa7b5ac7144ced7.tar.gz
Merge magare.gmz:/home/kgeorge/mysql/work/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/merge-5.1-opt
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index c67687b2bde..10280168f07 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -2161,12 +2161,18 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
keys_to_use.intersect(head->keys_in_use_for_query);
if (!keys_to_use.is_clear_all())
{
+#ifndef EMBEDDED_LIBRARY // Avoid compiler warning
+ char buff[STACK_BUFF_ALLOC];
+#endif
MEM_ROOT alloc;
SEL_TREE *tree= NULL;
KEY_PART *key_parts;
KEY *key_info;
PARAM param;
+ if (check_stack_overrun(thd, 2*STACK_MIN_SIZE, buff))
+ DBUG_RETURN(0); // Fatal error flag is set
+
/* set up parameter that is passed to all functions */
param.thd= thd;
param.baseflag= head->file->ha_table_flags();