mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-17891 Assertion failure upon attempt to replace into a full table
Problem: Assertion `transactional_table || !changed || thd->transaction.stmt.modified_non_trans_table' failed due REPLACE into a versioned table. It is not specific to system versioning/pertitioning/heap, but this combination makes it much easier to reproduce. The thing is to make first ha_update_row call succeed to make info->deleted != 0. And then make REPLACE fail by any reason. In this scenario we overflow versioned partition, so next ha_update_row succeeds, but corresponding ha_write_row fails to insert history record. Fix: modified_non_trans_table is set in one missed place
This commit is contained in:
@ -1959,6 +1959,8 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
||||
if (likely(!error))
|
||||
{
|
||||
info->deleted++;
|
||||
if (!table->file->has_transactions())
|
||||
thd->transaction.stmt.modified_non_trans_table= TRUE;
|
||||
if (table->versioned(VERS_TIMESTAMP))
|
||||
{
|
||||
store_record(table, record[2]);
|
||||
|
Reference in New Issue
Block a user