summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 880a3bc1d09..51c1bc984da 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -7039,7 +7039,12 @@ public:
inline bool add_item_to_list(THD *thd, Item *item)
{
- bool res= thd->lex->current_select->add_item_to_list(thd, item);
+ bool res;
+ LEX *lex= thd->lex;
+ if (lex->current_select->parsing_place == IN_RETURNING)
+ res= lex->returning()->add_item_to_list(thd, item);
+ else
+ res= lex->current_select->add_item_to_list(thd, item);
return res;
}