summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index b7296395444..4142540fa88 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -7738,6 +7738,8 @@ bool setup_fields(THD *thd, Ref_ptr_array ref_pointer_array,
thd->lex->current_select->select_list_tables|= item->used_tables();
thd->lex->used_tables|= item->used_tables();
thd->lex->current_select->cur_pos_in_select_list++;
+
+ thd->lex->current_select->rownum_in_field_list |= item->with_rownum_func();
}
thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup;
thd->lex->current_select->cur_pos_in_select_list= UNDEF_POS;