From 9687216251ed78d16b46aae5ef72a78ab21d2ce6 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Mon, 25 May 2026 11:22:07 +1000 Subject: [PATCH] MDEV-38405 Assertion `tbl->trn == 0' failed in _ma_set_trn_for_table Aria bulk insert operations disables share->now_transaction meaning a concurrent open of the stable table will have trn == &dummy_transaction_object for its MARIA_HA object during opening. As the _ma_set_trn_for_table is setting the trn, its harmless if the current trn is the dummy_transaction_object. Relax the assert to allow for this state. --- storage/maria/ma_trnman.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/maria/ma_trnman.h b/storage/maria/ma_trnman.h index 4a73dcda680e9..a0cbd5ccb6c0d 100644 --- a/storage/maria/ma_trnman.h +++ b/storage/maria/ma_trnman.h @@ -32,7 +32,7 @@ static inline void _ma_set_trn_for_table(MARIA_HA *tbl, TRN *newtrn) /* check that we are not calling this twice in a row */ DBUG_ASSERT(newtrn->used_instances != (void*) tbl); DBUG_ASSERT(newtrn != &dummy_transaction_object); - DBUG_ASSERT(tbl->trn == 0); + DBUG_ASSERT(tbl->trn == 0 || tbl->trn == &dummy_transaction_object); DBUG_ASSERT(tbl->trn_next == 0); DBUG_ASSERT(tbl->trn_prev == 0);