diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2018-01-19 19:05:43 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2018-01-20 16:10:37 +0400 |
commit | 90bf55673e63bf7c6633598abe52217e42516447 (patch) | |
tree | 136e7547a3e7a73afb5711f103b04895554895c4 /storage/innobase/include/read0types.h | |
parent | 64048bafe0fe5a7e73244929d6e4cae8eebb9a00 (diff) | |
download | mariadb-git-90bf55673e63bf7c6633598abe52217e42516447.tar.gz |
Misc trx_sys scalability fixes
trx_erase_lists(): trx->read_view is owned by current thread and thus
doesn't need trx_sys.mutex protection for reading it's value. Move
trx->read_view check out of mutex
trx_start_low(): moved assertion out of mutex.
Call ReadView::creator_trx_id() directly: allows to inline this one-line
method.
Diffstat (limited to 'storage/innobase/include/read0types.h')
-rw-r--r-- | storage/innobase/include/read0types.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/storage/innobase/include/read0types.h b/storage/innobase/include/read0types.h index 8056dbf437f..dd85409825f 100644 --- a/storage/innobase/include/read0types.h +++ b/storage/innobase/include/read0types.h @@ -239,6 +239,18 @@ public: return(m_ids.empty()); } + /** + Set the creator transaction id, existing id must be 0. + + Note: This shouldbe set only for views created by RW + transactions. Caller must own trx_sys.mutex. */ + void creator_trx_id(trx_id_t id) + { + ut_ad(id > 0); + ut_ad(m_creator_trx_id == 0); + m_creator_trx_id = id; + } + #ifdef UNIV_DEBUG /** @param rhs view to compare with @@ -278,14 +290,6 @@ private: m_trx_ids too and adjust the m_up_limit_id *, if required */ inline void copy_complete(); - /** - Set the creator transaction id, existing id must be 0 */ - void creator_trx_id(trx_id_t id) - { - ut_ad(m_creator_trx_id == 0); - m_creator_trx_id = id; - } - friend class MVCC; private: |