SQL: VIEW over a JOIN of versioned tables [fixes #153]

This commit is contained in:
kevg 2017-03-14 13:05:39 +03:00 committed by Aleksey Midenkov
commit 4ebf680c9b
3 changed files with 26 additions and 10 deletions

View file

@ -467,9 +467,9 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
const char *end = s->vers_end_field()->field_name;
select_lex->item_list.push_back(new (thd->mem_root) Item_field(
thd, &select_lex->context, NULL, NULL, start));
thd, &select_lex->context, tables->db, tables->alias, start));
select_lex->item_list.push_back(new (thd->mem_root) Item_field(
thd, &select_lex->context, NULL, NULL, end));
thd, &select_lex->context, tables->db, tables->alias, end));
if (lex->view_list.elements)
{