From 83bd4dd1ee9e7abe2ee33860b15edf7ec72c6b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 25 Apr 2018 10:41:32 +0300 Subject: MDEV-15914: Remove trx_t::undo_mutex The trx_t::undo_mutex covered both some main-memory data structures (trx_undo_t) and access to undo pages. The trx_undo_t is only accessed by the thread that is associated with a running transaction. Likewise, each transaction has its private set of undo pages. The thread that is associated with an active transaction may lock multiple undo pages concurrently, but no other thread may lock multiple pages of a foreign transaction. Concurrent access to the undo logs of an active transaction is possible, but trx_undo_get_undo_rec_low() only locks one undo page at a time, without ever holding any undo_mutex. It seems that the trx_t::undo_mutex would have been necessary if multi-threaded execution or rollback of a single transaction had been implemented in InnoDB. --- storage/innobase/que/que0que.cc | 5 ----- 1 file changed, 5 deletions(-) (limited to 'storage/innobase/que') diff --git a/storage/innobase/que/que0que.cc b/storage/innobase/que/que0que.cc index 937f215dc39..bf045a779ce 100644 --- a/storage/innobase/que/que0que.cc +++ b/storage/innobase/que/que0que.cc @@ -1005,11 +1005,6 @@ que_thr_step( } else if (type == QUE_NODE_FOR) { for_step(thr); } else if (type == QUE_NODE_PROC) { - - /* We can access trx->undo_no without reserving - trx->undo_mutex, because there cannot be active query - threads doing updating or inserting at the moment! */ - if (thr->prev_node == que_node_get_parent(node)) { trx->last_sql_stat_start.least_undo_no = trx->undo_no; -- cgit v1.2.1