diff options
Diffstat (limited to 'storage/innobase/srv')
-rw-r--r-- | storage/innobase/srv/srv0conc.cc | 2 | ||||
-rw-r--r-- | storage/innobase/srv/srv0mon.cc | 30 | ||||
-rw-r--r-- | storage/innobase/srv/srv0srv.cc | 10 | ||||
-rw-r--r-- | storage/innobase/srv/srv0start.cc | 38 |
4 files changed, 34 insertions, 46 deletions
diff --git a/storage/innobase/srv/srv0conc.cc b/storage/innobase/srv/srv0conc.cc index b2b464e31fa..157c2688c33 100644 --- a/storage/innobase/srv/srv0conc.cc +++ b/storage/innobase/srv/srv0conc.cc @@ -26,7 +26,7 @@ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA +51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA *****************************************************************************/ diff --git a/storage/innobase/srv/srv0mon.cc b/storage/innobase/srv/srv0mon.cc index 3b3fcf446c7..80beddd7f5e 100644 --- a/storage/innobase/srv/srv0mon.cc +++ b/storage/innobase/srv/srv0mon.cc @@ -14,7 +14,7 @@ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA +51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA *****************************************************************************/ @@ -911,15 +911,18 @@ static monitor_info_t innodb_counter_info[] = MONITOR_DEFAULT_START, MONITOR_OVLD_MAX_AGE_SYNC}, {"log_pending_log_flushes", "recovery", "Pending log flushes", - MONITOR_NONE, + static_cast<monitor_type_t>( + MONITOR_EXISTING | MONITOR_DISPLAY_CURRENT), MONITOR_DEFAULT_START, MONITOR_PENDING_LOG_FLUSH}, {"log_pending_checkpoint_writes", "recovery", "Pending checkpoints", - MONITOR_NONE, + static_cast<monitor_type_t>( + MONITOR_EXISTING | MONITOR_DISPLAY_CURRENT), MONITOR_DEFAULT_START, MONITOR_PENDING_CHECKPOINT_WRITE}, {"log_num_log_io", "recovery", "Number of log I/Os", - MONITOR_NONE, + static_cast<monitor_type_t>( + MONITOR_EXISTING | MONITOR_DISPLAY_CURRENT), MONITOR_DEFAULT_START, MONITOR_LOG_IO}, {"log_waits", "recovery", @@ -1991,6 +1994,25 @@ srv_mon_process_existing_counter( value = (mon_type_t) log_sys.lsn; break; + case MONITOR_PENDING_LOG_FLUSH: + mutex_enter(&log_sys.mutex); + value = static_cast<mon_type_t>(log_sys.n_pending_flushes); + mutex_exit(&log_sys.mutex); + break; + + case MONITOR_PENDING_CHECKPOINT_WRITE: + mutex_enter(&log_sys.mutex); + value = static_cast<mon_type_t>( + log_sys.n_pending_checkpoint_writes); + mutex_exit(&log_sys.mutex); + break; + + case MONITOR_LOG_IO: + mutex_enter(&log_sys.mutex); + value = static_cast<mon_type_t>(log_sys.n_log_ios); + mutex_exit(&log_sys.mutex); + break; + case MONITOR_OVLD_BUF_OLDEST_LSN: value = (mon_type_t) buf_pool_get_oldest_modification(); break; diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 3588ee99157..9a855932402 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -28,7 +28,7 @@ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA +51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA *****************************************************************************/ @@ -1993,16 +1993,12 @@ srv_master_evict_from_table_cache( { ulint n_tables_evicted = 0; - rw_lock_x_lock(dict_operation_lock); - - dict_mutex_enter_for_mysql(); + dict_sys_lock(); n_tables_evicted = dict_make_room_in_cache( innobase_get_table_cache_size(), pct_check); - dict_mutex_exit_for_mysql(); - - rw_lock_x_unlock(dict_operation_lock); + dict_sys_unlock(); return(n_tables_evicted); } diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 2337dfaada2..bde0623c228 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -28,7 +28,7 @@ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA +51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA *****************************************************************************/ @@ -2400,36 +2400,6 @@ skip_monitors: return(DB_SUCCESS); } -#if 0 -/******************************************************************** -Sync all FTS cache before shutdown */ -static -void -srv_fts_close(void) -/*===============*/ -{ - dict_table_t* table; - - for (table = UT_LIST_GET_FIRST(dict_sys->table_LRU); - table; table = UT_LIST_GET_NEXT(table_LRU, table)) { - fts_t* fts = table->fts; - - if (fts != NULL) { - fts_sync_table(table); - } - } - - for (table = UT_LIST_GET_FIRST(dict_sys->table_non_LRU); - table; table = UT_LIST_GET_NEXT(table_LRU, table)) { - fts_t* fts = table->fts; - - if (fts != NULL) { - fts_sync_table(table); - } - } -} -#endif - /** Shut down background threads that can generate undo log. */ void srv_shutdown_bg_undo_sources() { @@ -2487,7 +2457,7 @@ void innodb_shutdown() } ut_ad(dict_stats_event || !srv_was_started || srv_read_only_mode); - ut_ad(dict_sys || !srv_was_started); + ut_ad(dict_sys.is_initialised() || !srv_was_started); ut_ad(trx_sys.is_initialised() || !srv_was_started); ut_ad(buf_dblwr || !srv_was_started || srv_read_only_mode || srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO); @@ -2516,7 +2486,7 @@ void innodb_shutdown() and closing the data dictionary. */ #ifdef BTR_CUR_HASH_ADAPT - if (dict_sys) { + if (dict_sys.is_initialised()) { btr_search_disable(true); } #endif /* BTR_CUR_HASH_ADAPT */ @@ -2537,7 +2507,7 @@ void innodb_shutdown() mutex_free(&srv_misc_tmpfile_mutex); } - dict_close(); + dict_sys.close(); btr_search_sys_free(); /* 3. Free all InnoDB's own mutexes and the os_fast_mutexes inside |