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.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 7ebdc90f8b3..6e6611d54d2 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -4588,6 +4588,7 @@ int setup_wild(THD *thd, TABLE_LIST *tables, List<Item> &fields,
*/
arena= thd->activate_stmt_arena_if_needed(&backup);
+ thd->lex->current_select->cur_pos_in_select_list= 0;
while (wild_num && (item= it++))
{
if (item->type() == Item::FIELD_ITEM &&
@@ -4629,7 +4630,10 @@ int setup_wild(THD *thd, TABLE_LIST *tables, List<Item> &fields,
}
wild_num--;
}
+ else
+ thd->lex->current_select->cur_pos_in_select_list++;
}
+ thd->lex->current_select->cur_pos_in_select_list= UNDEF_POS;
if (arena)
{
/* make * substituting permanent */
@@ -5134,6 +5138,7 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
item->walk(&Item::reset_query_id_processor,
(byte *)(&thd->query_id));
}
+ thd->lex->current_select->cur_pos_in_select_list++;
}
/*
In case of stored tables, all fields are considered as used,