diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 28d27890f70..7ae2a306f01 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -1480,7 +1480,6 @@ fil_space_create( rw_lock_create(fil_space_latch_key, &space->latch, SYNC_FSP); if (space->purpose == FIL_TYPE_TEMPORARY) { - ut_d(space->latch.set_temp_fsp()); /* SysTablespace::open_or_create() would pass size!=0 to fil_node_create(), so first_time_open would not hold in fil_node_open_file(), and we diff --git a/storage/innobase/include/sync0types.h b/storage/innobase/include/sync0types.h index 73a9856e0b0..773c610d30e 100644 --- a/storage/innobase/include/sync0types.h +++ b/storage/innobase/include/sync0types.h @@ -979,8 +979,7 @@ struct latch_t { UNIV_NOTHROW : m_id(id), - m_rw_lock(), - m_temp_fsp() { } + m_rw_lock() {} /** Destructor */ virtual ~latch_t() UNIV_NOTHROW { } @@ -1014,24 +1013,6 @@ struct latch_t { return(sync_latch_get_level(m_id)); } - /** @return true if the latch is for a temporary file space*/ - bool is_temp_fsp() const - UNIV_NOTHROW - { - return(m_temp_fsp); - } - - /** Set the temporary tablespace flag. (For internal temporary - tables, MySQL 5.7 does not always acquire the index->lock. We - need to figure out the context and add some special rules - during the checks.) */ - void set_temp_fsp() - UNIV_NOTHROW - { - ut_ad(get_id() == LATCH_ID_FIL_SPACE); - m_temp_fsp = true; - } - /** @return the latch name, m_id must be set */ const char* get_name() const UNIV_NOTHROW @@ -1047,9 +1028,6 @@ struct latch_t { /** true if it is a rw-lock. In debug mode, rw_lock_t derives from this class and sets this variable. */ bool m_rw_lock; - - /** true if it is an temporary space latch */ - bool m_temp_fsp; }; /** Subclass this to iterate over a thread's acquired latch levels. */ diff --git a/storage/innobase/sync/sync0debug.cc b/storage/innobase/sync/sync0debug.cc index 2053b36e61d..c652e6d85f2 100644 --- a/storage/innobase/sync/sync0debug.cc +++ b/storage/innobase/sync/sync0debug.cc @@ -35,6 +35,7 @@ Created 2012-08-21 Sunny Bains #include "ut0new.h" #include "srv0start.h" +#include "fil0fil.h" #include #include @@ -910,19 +911,10 @@ LatchDebug::check_order( case SYNC_TREE_NODE: - { - const latch_t* fsp_latch; - - fsp_latch = find(latches, SYNC_FSP); - - ut_a((fsp_latch != NULL - && fsp_latch->is_temp_fsp()) - || find(latches, SYNC_INDEX_TREE) != 0 - || find(latches, SYNC_DICT_OPERATION) - || basic_check(latches, - level, SYNC_TREE_NODE - 1)); - } - + ut_a(find(latches, SYNC_FSP) == &fil_system.temp_space->latch + || find(latches, SYNC_INDEX_TREE) + || find(latches, SYNC_DICT_OPERATION) + || basic_check(latches, level, SYNC_TREE_NODE - 1)); break; case SYNC_TREE_NODE_NEW: