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

Merge 10.4 into 10.5

This commit is contained in:
Marko Mäkelä
2019-08-16 14:35:32 +03:00
119 changed files with 2738 additions and 1304 deletions

View File

@ -2608,6 +2608,7 @@ unlink_all_closed_tables(THD *thd, MYSQL_LOCK *lock, size_t reopen_count)
DBUG_ASSERT(thd->open_tables == m_reopen_array[reopen_count]);
thd->open_tables->pos_in_locked_tables->table= NULL;
thd->open_tables->pos_in_locked_tables= NULL;
close_thread_table(thd, &thd->open_tables);
}
@ -8461,8 +8462,8 @@ fill_record(THD *thd, TABLE *table_arg, List<Item> &fields, List<Item> &values,
rfield->field_index == table->next_number_field->field_index)
table->auto_increment_field_not_null= TRUE;
Item::Type type= value->type();
bool vers_sys_field= table->versioned() && rfield->vers_sys_field();
if ((rfield->vcol_info || vers_sys_field) &&
const bool skip_sys_field= rfield->vers_sys_field(); // TODO: && !thd->vers_modify_history() [MDEV-16546]
if ((rfield->vcol_info || skip_sys_field) &&
type != Item::DEFAULT_VALUE_ITEM &&
type != Item::NULL_ITEM &&
table->s->table_category != TABLE_CATEGORY_TEMPORARY)
@ -8471,15 +8472,14 @@ fill_record(THD *thd, TABLE *table_arg, List<Item> &fields, List<Item> &values,
ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN,
ER_THD(thd, ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN),
rfield->field_name.str, table->s->table_name.str);
if (vers_sys_field)
continue;
}
if (only_unvers_fields && !rfield->vers_update_unversioned())
only_unvers_fields= false;
if (rfield->stored_in_db())
{
if (unlikely(value->save_in_field(rfield, 0) < 0) && !ignore_errors)
if (!skip_sys_field &&
unlikely(value->save_in_field(rfield, 0) < 0) && !ignore_errors)
{
my_message(ER_UNKNOWN_ERROR, ER_THD(thd, ER_UNKNOWN_ERROR), MYF(0));
goto err;