summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2017-10-23 15:35:10 -0700
committerIgor Babaev <igor@askmonty.org>2017-10-23 15:35:10 -0700
commita1a79aa5760ff9595b0089ac6ad4ad917c109a03 (patch)
treea1279e7368d83bbb31833da31880092d654f792e /sql/table.cc
parentacb336f75e9e5d3d4a35979b1d9229680d132c39 (diff)
downloadmariadb-git-a1a79aa5760ff9595b0089ac6ad4ad917c109a03.tar.gz
MDEV-13776 mysqld got signal 11 on delete returning
The method Field_iterator_table::create_item() must take into account that it can be called when processing DELETE RETURNING.
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 54f7bc7b473..38a64348937 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -5260,7 +5260,8 @@ Item *Field_iterator_table::create_item(THD *thd)
Item_field *item= new Item_field(thd, &select->context, *ptr);
if (item && thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY &&
- !thd->lex->in_sum_func && select->cur_pos_in_select_list != UNDEF_POS)
+ !thd->lex->in_sum_func && select->cur_pos_in_select_list != UNDEF_POS &&
+ select->join)
{
select->join->non_agg_fields.push_back(item);
item->marker= select->cur_pos_in_select_list;