diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2019-03-05 21:12:54 +1000 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2021-01-07 14:53:41 +1000 |
commit | d846b55d9b899b4ecd318567e75c9713ca44ba23 (patch) | |
tree | bcb5f4d3880220618e8166bc8a597766770ea760 /sql | |
parent | 9a645dae9e59ec398cfda33529c44002625ddc87 (diff) | |
download | mariadb-git-d846b55d9b899b4ecd318567e75c9713ca44ba23.tar.gz |
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
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_insert.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 8115b3c6397..9db6acf73f8 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -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]); |