mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-15413 Unexpected errors upon CREATE TABLE .. WITH SYSTEM VERSIONING AS SELECT ...
numerous fixes for CREATE ... SELECT with system versioning: In CREATE ... SELECT the table is created based on the result set, field properties do not count. That is * field invisibility is *not* copied over * AS ROW START/END is *not* copied over * the history is *not* copied over * system row_start/row_end fields can *not* be created from the SELECT part
This commit is contained in:
@ -16517,11 +16517,7 @@ Field *create_tmp_field_from_field(THD *thd, Field *org_field,
|
||||
item->result_field= new_field;
|
||||
else
|
||||
new_field->field_name= *name;
|
||||
new_field->flags|= (org_field->flags & (
|
||||
NO_DEFAULT_VALUE_FLAG |
|
||||
VERS_SYS_START_FLAG |
|
||||
VERS_SYS_END_FLAG |
|
||||
VERS_UPDATE_UNVERSIONED_FLAG));
|
||||
new_field->flags|= org_field->flags & NO_DEFAULT_VALUE_FLAG;
|
||||
if (org_field->maybe_null() || (item && item->maybe_null))
|
||||
new_field->flags&= ~NOT_NULL_FLAG; // Because of outer join
|
||||
if (org_field->type() == MYSQL_TYPE_VAR_STRING ||
|
||||
@ -16786,9 +16782,6 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
|
||||
NULL);
|
||||
}
|
||||
|
||||
if (field->field->vers_sys_field())
|
||||
result->invisible= field->field->invisible;
|
||||
|
||||
if (orig_type == Item::REF_ITEM && orig_modify)
|
||||
((Item_ref*)orig_item)->set_result_field(result);
|
||||
/*
|
||||
|
Reference in New Issue
Block a user