summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index ccc72cea608..8c4dae92ddc 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -128,7 +128,12 @@ bool Item_subselect::fix_fields(THD *thd_param, TABLE_LIST *tables, Item **ref)
stmt= thd->current_statement;
char const *save_where= thd->where;
- int res= engine->prepare();
+ int res;
+
+ if (check_stack_overrun(thd, (gptr)&res))
+ return 1;
+
+ res= engine->prepare();
// all transformetion is done (used by prepared statements)
changed= 1;