summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-06-08 16:18:46 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-06-08 16:36:22 +0300
commitb5f2fb7cc6a09bb0da6897a76c103bd30eb7f307 (patch)
treee8d7c8ff2d4b06d5b58ee4c663928a92b31e3319
parent7b6fabb4a4b80259172c02fda184fc9b169ad429 (diff)
downloadmariadb-git-bb-10.6-MDEV-25506_FTS.tar.gz
Relax an assertion about fts_commit()bb-10.6-MDEV-25506_FTS
-rw-r--r--storage/innobase/trx/trx0trx.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index d770ebaaf6c..1d27bc0bba0 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -1460,12 +1460,13 @@ void trx_t::commit_low(mtr_t *mtr)
if (fts_trx && undo_no)
{
ut_a(!is_autocommit_non_locking());
- /* FTS-FIXME: Temporarily tolerate DB_DUPLICATE_KEY instead of
- dying. This is a possible scenario if there is a crash between
+ /* FTS-FIXME: Do this earlier, so that we can return an error,
+ instead of violating atomicity and corrupting data!
+ This is a possible scenario if there is a crash between
insert to DELETED table committing and transaction committing. The
fix would be able to return error from this function */
- if (dberr_t error= fts_commit(this))
- ut_a(error == DB_DUPLICATE_KEY);
+ if (ut_d(dberr_t error=) fts_commit(this))
+ ut_ad(error == DB_DUPLICATE_KEY || error == DB_LOCK_WAIT_TIMEOUT);
}
#ifndef DBUG_OFF