summaryrefslogtreecommitdiff
path: root/storage/xtradb
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-06-16 11:05:09 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-06-16 12:37:00 +0300
commite5980bf1b12f6dc4fa4ab44feb1b6a734dcc84d3 (patch)
tree29ed5983577b468a5af5a9e155df56728d0a2cb9 /storage/xtradb
parent6b71b3e3484818b667790b0f7426c37138fbbe53 (diff)
downloadmariadb-git-e5980bf1b12f6dc4fa4ab44feb1b6a734dcc84d3.tar.gz
Remove the unnecessary method handlerton::release_temporary_latches()
The sole purpose of handlerton::release_temporary_latches and its wrapper function was to release the InnoDB adaptive hash index latch (btr_search_latch). 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. As part of that, the function trx_search_latch_release_if_reserved() was changed to an assertion and the function trx_reserve_search_latch_if_not_reserved() was removed, and handlerton::release_temporary_latches() practically became a no-op. Note: MDEV-12121 replaced the function trx_search_latch_release_if_reserved() with the more appropriately named macro trx_assert_no_search_latch().
Diffstat (limited to 'storage/xtradb')
-rw-r--r--storage/xtradb/handler/ha_innodb.cc42
1 files changed, 0 insertions, 42 deletions
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 591df34a578..b797c0a2114 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -2123,39 +2123,6 @@ ha_innobase::is_fake_change_enabled(THD* thd)
}
/********************************************************************//**
-In XtraDB it is impossible for a transaction to own a search latch outside of
-InnoDB code, so there is nothing to release on demand. We keep this function to
-simplify maintenance.
-@return 0 */
-static
-int
-innobase_release_temporary_latches(
-/*===============================*/
- handlerton* hton MY_ATTRIBUTE((unused)), /*!< in: handlerton */
- THD* thd MY_ATTRIBUTE((unused))) /*!< in: MySQL thread */
-{
-#ifdef UNIV_DEBUG
- DBUG_ASSERT(hton == innodb_hton_ptr);
-
- if (!innodb_inited || thd == NULL) {
-
- return(0);
- }
-
- trx_t* trx = thd_to_trx(thd);
-
- if (trx != NULL) {
-#ifdef UNIV_SYNC_DEBUG
- ut_ad(!btr_search_own_any());
-#endif
- trx_search_latch_release_if_reserved(trx);
- }
-#endif
-
- return(0);
-}
-
-/********************************************************************//**
Increments innobase_active_counter and every INNOBASE_WAKE_INTERVALth
time calls srv_active_wake_master_thread. This function should be used
when a single database operation may introduce a small need for
@@ -3813,9 +3780,6 @@ innobase_init(
innobase_hton->flags = HTON_SUPPORTS_EXTENDED_KEYS |
HTON_SUPPORTS_FOREIGN_KEYS;
- innobase_hton->release_temporary_latches =
- innobase_release_temporary_latches;
-
innobase_hton->kill_query = innobase_kill_connection;
if (srv_file_per_table)
@@ -6262,9 +6226,6 @@ ha_innobase::open(
thd = ha_thd();
- /* No-op in XtraDB */
- innobase_release_temporary_latches(ht, thd);
-
normalize_table_name(norm_name, name);
user_thd = NULL;
@@ -6724,9 +6685,6 @@ ha_innobase::close()
thd = ha_thd();
- /* No-op in XtraDB */
- innobase_release_temporary_latches(ht, thd);
-
row_prebuilt_free(prebuilt, FALSE);
if (upd_buf != NULL) {