1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-15645 Assertion `table->insert_values' failed in write_record upon REPLACE into a view with underlying versioned table

Right temporary storage for system versioning operations is table->record[2],
not table->insert_values

Closes #712
This commit is contained in:
Eugene Kosov
2018-04-19 22:23:14 +03:00
committed by Sergei Golubchik
parent 7d42135959
commit 133cfe39f1
4 changed files with 20 additions and 12 deletions

View File

@ -1970,13 +1970,12 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
error= table->file->ha_delete_row(table->record[1]);
else
{
DBUG_ASSERT(table->insert_values);
store_record(table,insert_values);
restore_record(table,record[1]);
store_record(table, record[2]);
restore_record(table, record[1]);
table->vers_update_end();
error= table->file->ha_update_row(table->record[1],
table->record[0]);
restore_record(table,insert_values);
restore_record(table, record[2]);
}
if (unlikely(error))
goto err;