summaryrefslogtreecommitdiff
path: root/storage/innobase/trx/trx0i_s.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-06-16 12:21:46 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-06-16 13:17:05 +0300
commit50faeda4d6dfa67b08022e74f6d4e6e7a69a5edc (patch)
treea8d145c99d373e542d822bacb7d4590a5fff27cf /storage/innobase/trx/trx0i_s.cc
parente5980bf1b12f6dc4fa4ab44feb1b6a734dcc84d3 (diff)
downloadmariadb-git-50faeda4d6dfa67b08022e74f6d4e6e7a69a5edc.tar.gz
Remove trx_t::has_search_latch and simplify debug code
When the btr_search_latch was split into an array of latches in MySQL 5.7.8 as part of the Oracle Bug#20985298 fix, the "caching" of the latch across storage engine API calls was removed, and the field trx->has_search_latch would only be set during a short time frame in the execution of row_search_mvcc(), which was formerly called row_search_for_mysql(). This means that the column INFORMATION_SCHEMA.INNODB_TRX.TRX_ADAPTIVE_HASH_LATCHED will always report 0. That column cannot be removed in MariaDB 10.2, but it can be removed in future releases. trx_t::has_search_latch: Remove. trx_assert_no_search_latch(): Remove. row_sel_try_search_shortcut_for_mysql(): Remove a redundant condition on trx->has_search_latch (it was always true). sync_check_iterate(): Make the parameter const. sync_check_functor_t: Make the operator() const, and remove result() and the virtual destructor. There is no need to have mutable state in the functors. sync_checker<bool>: Replaces dict_sync_check and btrsea_sync_check. sync_check: Replaces btrsea_sync_check. dict_sync_check: Instantiated from sync_checker. sync_allowed_latches: Use std::find() directly on the array. Remove the std::vector. TrxInInnoDB::enter(), TrxInInnoDB::exit(): Remove obviously redundant debug assertions on trx->in_depth, and use equality comparison against 0 because it could be more efficient on some architectures.
Diffstat (limited to 'storage/innobase/trx/trx0i_s.cc')
-rw-r--r--storage/innobase/trx/trx0i_s.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/storage/innobase/trx/trx0i_s.cc b/storage/innobase/trx/trx0i_s.cc
index fcc50b8c76d..7854ad2ab5a 100644
--- a/storage/innobase/trx/trx0i_s.cc
+++ b/storage/innobase/trx/trx0i_s.cc
@@ -589,10 +589,6 @@ thd_done:
row->trx_foreign_key_error = NULL;
}
-#ifdef BTR_CUR_HASH_ADAPT
- row->trx_has_search_latch = (ibool) trx->has_search_latch;
-#endif /* BTR_CUR_HASH_ADAPT */
-
row->trx_is_read_only = trx->read_only;
row->trx_is_autocommit_non_locking = trx_is_autocommit_non_locking(trx);