1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

SQL: VIEW NATURAL JOIN TABLE [fixes #161]

This commit is contained in:
kevg
2017-03-23 16:14:19 +03:00
committed by Aleksey Midenkov
parent 21e8b22f53
commit e8ae9f1ae9
3 changed files with 49 additions and 2 deletions

View File

@ -6383,6 +6383,15 @@ mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2,
if (nj_col_1->field() && nj_col_1->field()->vers_sys_field())
continue;
if (table_ref_1->is_view() && table_ref_1->table->versioned())
{
Item *item= nj_col_1->view_field->item;
DBUG_ASSERT(item->type() == Item::FIELD_ITEM);
Item_field *item_field= (Item_field *)item;
if (item_field->field->vers_sys_field())
continue;
}
field_name_1= nj_col_1->name();
is_using_column_1= using_fields &&
test_if_string_in_list(field_name_1, using_fields);