diff options
-rw-r--r-- | include/mysql/plugin.h | 2 | ||||
-rw-r--r-- | include/mysql/plugin_audit.h.pp | 2 | ||||
-rw-r--r-- | include/mysql/plugin_auth.h.pp | 2 | ||||
-rw-r--r-- | include/mysql/plugin_encryption.h.pp | 2 | ||||
-rw-r--r-- | include/mysql/plugin_ftparser.h.pp | 2 | ||||
-rw-r--r-- | include/mysql/plugin_password_validation.h.pp | 2 | ||||
-rw-r--r-- | sql/sql_show.cc | 6 | ||||
-rw-r--r-- | storage/innobase/buf/buf0flu.cc | 2 | ||||
-rw-r--r-- | storage/innobase/dict/dict0dict.cc | 19 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 305 | ||||
-rw-r--r-- | storage/innobase/include/buf0flu.h | 3 | ||||
-rw-r--r-- | storage/innobase/include/dict0dict.h | 24 | ||||
-rw-r--r-- | storage/innobase/include/srv0srv.h | 47 | ||||
-rw-r--r-- | storage/innobase/lock/lock0lock.cc | 2 | ||||
-rw-r--r-- | storage/innobase/os/os0file.cc | 3 | ||||
-rw-r--r-- | storage/innobase/srv/srv0srv.cc | 117 |
16 files changed, 299 insertions, 241 deletions
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 42a95e25697..85e52a247af 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -177,7 +177,7 @@ enum enum_mysql_show_type SHOW_ULONGLONG, SHOW_CHAR, SHOW_CHAR_PTR, SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE, SHOW_SINT, SHOW_SLONG, SHOW_SLONGLONG, SHOW_SIMPLE_FUNC, - SHOW_always_last + SHOW_SIZE_T, SHOW_always_last }; /* backward compatibility mapping. */ diff --git a/include/mysql/plugin_audit.h.pp b/include/mysql/plugin_audit.h.pp index f9c87dce23b..3d99da3c2e5 100644 --- a/include/mysql/plugin_audit.h.pp +++ b/include/mysql/plugin_audit.h.pp @@ -432,7 +432,7 @@ enum enum_mysql_show_type SHOW_ULONGLONG, SHOW_CHAR, SHOW_CHAR_PTR, SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE, SHOW_SINT, SHOW_SLONG, SHOW_SLONGLONG, SHOW_SIMPLE_FUNC, - SHOW_always_last + SHOW_SIZE_T, SHOW_always_last }; enum enum_var_type { diff --git a/include/mysql/plugin_auth.h.pp b/include/mysql/plugin_auth.h.pp index 40ff9a80634..14035bf1e9b 100644 --- a/include/mysql/plugin_auth.h.pp +++ b/include/mysql/plugin_auth.h.pp @@ -432,7 +432,7 @@ enum enum_mysql_show_type SHOW_ULONGLONG, SHOW_CHAR, SHOW_CHAR_PTR, SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE, SHOW_SINT, SHOW_SLONG, SHOW_SLONGLONG, SHOW_SIMPLE_FUNC, - SHOW_always_last + SHOW_SIZE_T, SHOW_always_last }; enum enum_var_type { diff --git a/include/mysql/plugin_encryption.h.pp b/include/mysql/plugin_encryption.h.pp index cd5304d8113..0cdb95bae24 100644 --- a/include/mysql/plugin_encryption.h.pp +++ b/include/mysql/plugin_encryption.h.pp @@ -432,7 +432,7 @@ enum enum_mysql_show_type SHOW_ULONGLONG, SHOW_CHAR, SHOW_CHAR_PTR, SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE, SHOW_SINT, SHOW_SLONG, SHOW_SLONGLONG, SHOW_SIMPLE_FUNC, - SHOW_always_last + SHOW_SIZE_T, SHOW_always_last }; enum enum_var_type { diff --git a/include/mysql/plugin_ftparser.h.pp b/include/mysql/plugin_ftparser.h.pp index 68afdfa80f0..68952404999 100644 --- a/include/mysql/plugin_ftparser.h.pp +++ b/include/mysql/plugin_ftparser.h.pp @@ -432,7 +432,7 @@ enum enum_mysql_show_type SHOW_ULONGLONG, SHOW_CHAR, SHOW_CHAR_PTR, SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE, SHOW_SINT, SHOW_SLONG, SHOW_SLONGLONG, SHOW_SIMPLE_FUNC, - SHOW_always_last + SHOW_SIZE_T, SHOW_always_last }; enum enum_var_type { diff --git a/include/mysql/plugin_password_validation.h.pp b/include/mysql/plugin_password_validation.h.pp index d9122302c4e..3ebf70291fd 100644 --- a/include/mysql/plugin_password_validation.h.pp +++ b/include/mysql/plugin_password_validation.h.pp @@ -432,7 +432,7 @@ enum enum_mysql_show_type SHOW_ULONGLONG, SHOW_CHAR, SHOW_CHAR_PTR, SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE, SHOW_SINT, SHOW_SLONG, SHOW_SLONGLONG, SHOW_SIMPLE_FUNC, - SHOW_always_last + SHOW_SIZE_T, SHOW_always_last }; enum enum_var_type { diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 947985fa6bf..b39667c1101 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3626,12 +3626,18 @@ const char* get_one_variable(THD *thd, /* fall through */ case SHOW_ULONG: case SHOW_LONG_NOFLUSH: // the difference lies in refresh_status() +#ifndef _WIN64 + case SHOW_SIZE_T: +#endif end= int10_to_str(*(long*) value, buff, 10); break; case SHOW_LONGLONG_STATUS: value= ((char *) status_var + (intptr) value); /* fall through */ case SHOW_ULONGLONG: +#ifdef _WIN64 + case SHOW_SIZE_T: +#endif end= longlong10_to_str(*(longlong*) value, buff, 10); break; case SHOW_HA_ROWS: diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index aa44a1c5e4c..ac5b1edebfc 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -63,7 +63,7 @@ static const ulint buf_flush_wait_flushed_sleep_time = 10000; #include <my_service_manager.h> /** Number of pages flushed through non flush_list flushes. */ -static ulint buf_lru_flush_page_count = 0; +ulint buf_lru_flush_page_count; /** Flag indicating if the page_cleaner is in active state. This flag is set to TRUE by the page_cleaner thread when it is spawned and is set diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index 061025f37fa..9643584b167 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -6504,25 +6504,6 @@ dict_tf_to_row_format_string( return(0); } -/** Calculate the used memory occupied by the data dictionary -table and index objects. -@return number of bytes occupied. */ -UNIV_INTERN -ulint -dict_sys_get_size() -{ - /* No mutex; this is a very crude approximation anyway */ - ulint size = UT_LIST_GET_LEN(dict_sys.table_LRU) - + UT_LIST_GET_LEN(dict_sys.table_non_LRU); - size *= sizeof(dict_table_t) - + sizeof(dict_index_t) * 2 - + (sizeof(dict_col_t) + sizeof(dict_field_t)) * 10 - + sizeof(dict_field_t) * 5 /* total number of key fields */ - + 200; /* arbitrary, covering names and overhead */ - - return size; -} - /** Look for any dictionary objects that are found in the given tablespace. @param[in] space_id Tablespace ID to search for. @return true if tablespace is empty. */ diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index fce893cb68c..9f0dca0e9bb 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -941,6 +941,14 @@ static MYSQL_THDVAR_STR(tmpdir, innodb_tmpdir_validate, NULL, NULL); static SHOW_VAR innodb_status_variables[]= { +#ifdef BTR_CUR_HASH_ADAPT + {"adaptive_hash_hash_searches", &btr_cur_n_sea, SHOW_SIZE_T}, + {"adaptive_hash_non_hash_searches", &btr_cur_n_non_sea, SHOW_SIZE_T}, +#endif + {"background_log_sync", &srv_log_writes_and_flush, SHOW_SIZE_T}, +#if defined(LINUX_NATIVE_AIO) + {"buffered_aio_submitted", &srv_stats.buffered_aio_submitted, SHOW_SIZE_T}, +#endif {"buffer_pool_dump_status", (char*) &export_vars.innodb_buffer_pool_dump_status, SHOW_CHAR}, {"buffer_pool_load_status", @@ -950,229 +958,208 @@ static SHOW_VAR innodb_status_variables[]= { {"buffer_pool_load_incomplete", &export_vars.innodb_buffer_pool_load_incomplete, SHOW_BOOL}, {"buffer_pool_pages_data", - (char*) &export_vars.innodb_buffer_pool_pages_data, SHOW_LONG}, + &export_vars.innodb_buffer_pool_pages_data, SHOW_SIZE_T}, {"buffer_pool_bytes_data", - (char*) &export_vars.innodb_buffer_pool_bytes_data, SHOW_LONG}, + &export_vars.innodb_buffer_pool_bytes_data, SHOW_SIZE_T}, {"buffer_pool_pages_dirty", - (char*) &export_vars.innodb_buffer_pool_pages_dirty, SHOW_LONG}, + &export_vars.innodb_buffer_pool_pages_dirty, SHOW_SIZE_T}, {"buffer_pool_bytes_dirty", - (char*) &export_vars.innodb_buffer_pool_bytes_dirty, SHOW_LONG}, + &export_vars.innodb_buffer_pool_bytes_dirty, SHOW_SIZE_T}, {"buffer_pool_pages_flushed", - (char*) &export_vars.innodb_buffer_pool_pages_flushed, SHOW_LONG}, + &export_vars.innodb_buffer_pool_pages_flushed, SHOW_SIZE_T}, {"buffer_pool_pages_free", - (char*) &export_vars.innodb_buffer_pool_pages_free, SHOW_LONG}, + &export_vars.innodb_buffer_pool_pages_free, SHOW_SIZE_T}, #ifdef UNIV_DEBUG {"buffer_pool_pages_latched", - (char*) &export_vars.innodb_buffer_pool_pages_latched, SHOW_LONG}, + &export_vars.innodb_buffer_pool_pages_latched, SHOW_SIZE_T}, #endif /* UNIV_DEBUG */ + {"buffer_pool_pages_made_not_young", + &export_vars.innodb_buffer_pool_pages_made_not_young, SHOW_SIZE_T}, + {"buffer_pool_pages_made_young", + &export_vars.innodb_buffer_pool_pages_made_young, SHOW_SIZE_T}, {"buffer_pool_pages_misc", - (char*) &export_vars.innodb_buffer_pool_pages_misc, SHOW_LONG}, + &export_vars.innodb_buffer_pool_pages_misc, SHOW_SIZE_T}, + {"buffer_pool_pages_old", + &export_vars.innodb_buffer_pool_pages_old, SHOW_SIZE_T}, {"buffer_pool_pages_total", - (char*) &export_vars.innodb_buffer_pool_pages_total, SHOW_LONG}, + &export_vars.innodb_buffer_pool_pages_total, SHOW_SIZE_T}, + {"buffer_pool_pages_LRU_flushed", &buf_lru_flush_page_count, SHOW_SIZE_T}, {"buffer_pool_read_ahead_rnd", - (char*) &export_vars.innodb_buffer_pool_read_ahead_rnd, SHOW_LONG}, + &export_vars.innodb_buffer_pool_read_ahead_rnd, SHOW_SIZE_T}, {"buffer_pool_read_ahead", - (char*) &export_vars.innodb_buffer_pool_read_ahead, SHOW_LONG}, + &export_vars.innodb_buffer_pool_read_ahead, SHOW_SIZE_T}, {"buffer_pool_read_ahead_evicted", - (char*) &export_vars.innodb_buffer_pool_read_ahead_evicted, SHOW_LONG}, + &export_vars.innodb_buffer_pool_read_ahead_evicted, SHOW_SIZE_T}, {"buffer_pool_read_requests", - (char*) &export_vars.innodb_buffer_pool_read_requests, SHOW_LONG}, + &export_vars.innodb_buffer_pool_read_requests, SHOW_SIZE_T}, {"buffer_pool_reads", - (char*) &export_vars.innodb_buffer_pool_reads, SHOW_LONG}, + &export_vars.innodb_buffer_pool_reads, SHOW_SIZE_T}, {"buffer_pool_wait_free", - (char*) &export_vars.innodb_buffer_pool_wait_free, SHOW_LONG}, + &export_vars.innodb_buffer_pool_wait_free, SHOW_SIZE_T}, {"buffer_pool_write_requests", - (char*) &export_vars.innodb_buffer_pool_write_requests, SHOW_LONG}, - {"data_fsyncs", - (char*) &export_vars.innodb_data_fsyncs, SHOW_LONG}, - {"data_pending_fsyncs", - (char*) &export_vars.innodb_data_pending_fsyncs, SHOW_LONG}, - {"data_pending_reads", - (char*) &export_vars.innodb_data_pending_reads, SHOW_LONG}, - {"data_pending_writes", - (char*) &export_vars.innodb_data_pending_writes, SHOW_LONG}, - {"data_read", - (char*) &export_vars.innodb_data_read, SHOW_LONG}, - {"data_reads", - (char*) &export_vars.innodb_data_reads, SHOW_LONG}, - {"data_writes", - (char*) &export_vars.innodb_data_writes, SHOW_LONG}, - {"data_written", - (char*) &export_vars.innodb_data_written, SHOW_LONG}, - {"dblwr_pages_written", - (char*) &export_vars.innodb_dblwr_pages_written, SHOW_LONG}, - {"dblwr_writes", - (char*) &export_vars.innodb_dblwr_writes, SHOW_LONG}, - {"log_waits", - (char*) &export_vars.innodb_log_waits, SHOW_LONG}, - {"log_write_requests", - (char*) &export_vars.innodb_log_write_requests, SHOW_LONG}, - {"log_writes", - (char*) &export_vars.innodb_log_writes, SHOW_LONG}, - {"os_log_fsyncs", - (char*) &export_vars.innodb_os_log_fsyncs, SHOW_LONG}, - {"os_log_pending_fsyncs", - (char*) &export_vars.innodb_os_log_pending_fsyncs, SHOW_LONG}, - {"os_log_pending_writes", - (char*) &export_vars.innodb_os_log_pending_writes, SHOW_LONG}, - {"os_log_written", - (char*) &export_vars.innodb_os_log_written, SHOW_LONGLONG}, - {"page_size", - (char*) &export_vars.innodb_page_size, SHOW_LONG}, - {"pages_created", - (char*) &export_vars.innodb_pages_created, SHOW_LONG}, - {"pages_read", - (char*) &export_vars.innodb_pages_read, SHOW_LONG}, - {"pages_written", - (char*) &export_vars.innodb_pages_written, SHOW_LONG}, - {"row_lock_current_waits", - (char*) &export_vars.innodb_row_lock_current_waits, SHOW_LONG}, - {"row_lock_time", - (char*) &export_vars.innodb_row_lock_time, SHOW_LONGLONG}, - {"row_lock_time_avg", - (char*) &export_vars.innodb_row_lock_time_avg, SHOW_LONG}, - {"row_lock_time_max", - (char*) &export_vars.innodb_row_lock_time_max, SHOW_LONG}, - {"row_lock_waits", - (char*) &export_vars.innodb_row_lock_waits, SHOW_LONG}, - {"rows_deleted", - (char*) &export_vars.innodb_rows_deleted, SHOW_LONG}, - {"rows_inserted", - (char*) &export_vars.innodb_rows_inserted, SHOW_LONG}, - {"rows_read", - (char*) &export_vars.innodb_rows_read, SHOW_LONG}, - {"rows_updated", - (char*) &export_vars.innodb_rows_updated, SHOW_LONG}, - {"system_rows_deleted", - (char*) &export_vars.innodb_system_rows_deleted, SHOW_LONG}, - {"system_rows_inserted", - (char*) &export_vars.innodb_system_rows_inserted, SHOW_LONG}, - {"system_rows_read", - (char*) &export_vars.innodb_system_rows_read, SHOW_LONG}, - {"system_rows_updated", - (char*) &export_vars.innodb_system_rows_updated, SHOW_LONG}, - {"num_open_files", - (char*) &export_vars.innodb_num_open_files, SHOW_LONG}, - {"truncated_status_writes", - (char*) &export_vars.innodb_truncated_status_writes, SHOW_LONG}, + &export_vars.innodb_buffer_pool_write_requests, SHOW_SIZE_T}, + {"checkpoint_age", &export_vars.innodb_checkpoint_age, SHOW_SIZE_T}, + {"checkpoint_max_age", &export_vars.innodb_checkpoint_max_age, SHOW_SIZE_T}, + {"data_fsyncs", &export_vars.innodb_data_fsyncs, SHOW_SIZE_T}, + {"data_pending_fsyncs", &export_vars.innodb_data_pending_fsyncs,SHOW_SIZE_T}, + {"data_pending_reads", &export_vars.innodb_data_pending_reads, SHOW_SIZE_T}, + {"data_pending_writes", &export_vars.innodb_data_pending_writes,SHOW_SIZE_T}, + {"data_read", &export_vars.innodb_data_read, SHOW_SIZE_T}, + {"data_reads", &export_vars.innodb_data_reads, SHOW_SIZE_T}, + {"data_writes", &export_vars.innodb_data_writes, SHOW_SIZE_T}, + {"data_written", &export_vars.innodb_data_written, SHOW_SIZE_T}, + {"dblwr_pages_written", &export_vars.innodb_dblwr_pages_written,SHOW_SIZE_T}, + {"dblwr_writes", &export_vars.innodb_dblwr_writes, SHOW_SIZE_T}, + {"deadlocks", &srv_stats.lock_deadlock_count, SHOW_SIZE_T}, + {"history_list_length", &export_vars.innodb_history_list_length,SHOW_SIZE_T}, + {"ibuf_discarded_delete_marks", &ibuf.n_discarded_ops[IBUF_OP_DELETE_MARK], + SHOW_SIZE_T}, + {"ibuf_discarded_deletes", &ibuf.n_discarded_ops[IBUF_OP_DELETE], + SHOW_SIZE_T}, + {"ibuf_discarded_inserts", &ibuf.n_discarded_ops[IBUF_OP_INSERT], + SHOW_SIZE_T}, + {"ibuf_free_list", &ibuf.free_list_len, SHOW_SIZE_T}, + {"ibuf_merged_delete_marks", &ibuf.n_merged_ops[IBUF_OP_DELETE_MARK], + SHOW_SIZE_T}, + {"ibuf_merged_deletes", &ibuf.n_merged_ops[IBUF_OP_DELETE], SHOW_SIZE_T}, + {"ibuf_merged_inserts", &ibuf.n_merged_ops[IBUF_OP_INSERT], SHOW_SIZE_T}, + {"ibuf_merges", &ibuf.n_merges, SHOW_SIZE_T}, + {"ibuf_segment_size", &ibuf.seg_size, SHOW_SIZE_T}, + {"ibuf_size", &ibuf.size, SHOW_SIZE_T}, + {"log_waits", &export_vars.innodb_log_waits, SHOW_SIZE_T}, + {"log_write_requests", &export_vars.innodb_log_write_requests, SHOW_SIZE_T}, + {"log_writes", &export_vars.innodb_log_writes, SHOW_SIZE_T}, + {"lsn_current", &export_vars.innodb_lsn_current, SHOW_ULONGLONG}, + {"lsn_flushed", &export_vars.innodb_lsn_flushed, SHOW_ULONGLONG}, + {"lsn_last_checkpoint", &export_vars.innodb_lsn_last_checkpoint, + SHOW_ULONGLONG}, + {"master_thread_active_loops", &srv_main_active_loops, SHOW_SIZE_T}, + {"master_thread_idle_loops", &srv_main_idle_loops, SHOW_SIZE_T}, + {"max_trx_id", &export_vars.innodb_max_trx_id, SHOW_ULONGLONG}, +#ifdef BTR_CUR_HASH_ADAPT + {"mem_adaptive_hash", &export_vars.innodb_mem_adaptive_hash, SHOW_SIZE_T}, +#endif + {"mem_dictionary", &export_vars.innodb_mem_dictionary, SHOW_SIZE_T}, + {"os_log_fsyncs", &export_vars.innodb_os_log_fsyncs, SHOW_SIZE_T}, + {"os_log_pending_fsyncs", &export_vars.innodb_os_log_pending_fsyncs, + SHOW_SIZE_T}, + {"os_log_pending_writes", &export_vars.innodb_os_log_pending_writes, + SHOW_SIZE_T}, + {"os_log_written", &export_vars.innodb_os_log_written, SHOW_SIZE_T}, + {"page_size", &srv_page_size, SHOW_ULONG}, + {"pages_created", &export_vars.innodb_pages_created, SHOW_SIZE_T}, + {"pages_read", &export_vars.innodb_pages_read, SHOW_SIZE_T}, + {"pages_written", &export_vars.innodb_pages_written, SHOW_SIZE_T}, + {"row_lock_current_waits", &export_vars.innodb_row_lock_current_waits, + SHOW_SIZE_T}, + {"row_lock_time", &export_vars.innodb_row_lock_time, SHOW_LONGLONG}, + {"row_lock_time_avg", &export_vars.innodb_row_lock_time_avg, SHOW_SIZE_T}, + {"row_lock_time_max", &export_vars.innodb_row_lock_time_max, SHOW_SIZE_T}, + {"row_lock_waits", &export_vars.innodb_row_lock_waits, SHOW_SIZE_T}, + {"rows_deleted", &export_vars.innodb_rows_deleted, SHOW_SIZE_T}, + {"rows_inserted", &export_vars.innodb_rows_inserted, SHOW_SIZE_T}, + {"rows_read", &export_vars.innodb_rows_read, SHOW_SIZE_T}, + {"rows_updated", &export_vars.innodb_rows_updated, SHOW_SIZE_T}, + {"system_rows_deleted", &export_vars.innodb_system_rows_deleted,SHOW_SIZE_T}, + {"system_rows_inserted", &export_vars.innodb_system_rows_inserted, + SHOW_SIZE_T}, + {"system_rows_read", &export_vars.innodb_system_rows_read, SHOW_SIZE_T}, + {"system_rows_updated", &export_vars.innodb_system_rows_updated, + SHOW_SIZE_T}, + {"num_open_files", &export_vars.innodb_num_open_files, SHOW_SIZE_T}, + {"truncated_status_writes", &export_vars.innodb_truncated_status_writes, + SHOW_SIZE_T}, {"available_undo_logs", &srv_available_undo_logs, SHOW_ULONG}, - {"undo_truncations", - (char*) &export_vars.innodb_undo_truncations, SHOW_LONG}, + {"undo_truncations", &export_vars.innodb_undo_truncations, SHOW_ULONG}, /* Status variables for page compression */ {"page_compression_saved", - (char*) &export_vars.innodb_page_compression_saved, SHOW_LONGLONG}, + &export_vars.innodb_page_compression_saved, SHOW_LONGLONG}, {"num_index_pages_written", - (char*) &export_vars.innodb_index_pages_written, SHOW_LONGLONG}, + &export_vars.innodb_index_pages_written, SHOW_LONGLONG}, {"num_non_index_pages_written", - (char*) &export_vars.innodb_non_index_pages_written, SHOW_LONGLONG}, + &export_vars.innodb_non_index_pages_written, SHOW_LONGLONG}, {"num_pages_page_compressed", - (char*) &export_vars.innodb_pages_page_compressed, SHOW_LONGLONG}, + &export_vars.innodb_pages_page_compressed, SHOW_LONGLONG}, {"num_page_compressed_trim_op", - (char*) &export_vars.innodb_page_compressed_trim_op, SHOW_LONGLONG}, + &export_vars.innodb_page_compressed_trim_op, SHOW_LONGLONG}, {"num_pages_page_decompressed", - (char*) &export_vars.innodb_pages_page_decompressed, SHOW_LONGLONG}, + &export_vars.innodb_pages_page_decompressed, SHOW_LONGLONG}, {"num_pages_page_compression_error", - (char*) &export_vars.innodb_pages_page_compression_error, SHOW_LONGLONG}, + &export_vars.innodb_pages_page_compression_error, SHOW_LONGLONG}, {"num_pages_encrypted", - (char*) &export_vars.innodb_pages_encrypted, SHOW_LONGLONG}, + &export_vars.innodb_pages_encrypted, SHOW_LONGLONG}, {"num_pages_decrypted", - (char*) &export_vars.innodb_pages_decrypted, SHOW_LONGLONG}, - {"have_lz4", - (char*) &innodb_have_lz4, SHOW_BOOL}, - {"have_lzo", - (char*) &innodb_have_lzo, SHOW_BOOL}, - {"have_lzma", - (char*) &innodb_have_lzma, SHOW_BOOL}, - {"have_bzip2", - (char*) &innodb_have_bzip2, SHOW_BOOL}, - {"have_snappy", - (char*) &innodb_have_snappy, SHOW_BOOL}, - {"have_punch_hole", - (char*) &innodb_have_punch_hole, SHOW_BOOL}, + &export_vars.innodb_pages_decrypted, SHOW_LONGLONG}, + {"have_lz4", &innodb_have_lz4, SHOW_BOOL}, + {"have_lzo", &innodb_have_lzo, SHOW_BOOL}, + {"have_lzma", &innodb_have_lzma, SHOW_BOOL}, + {"have_bzip2", &innodb_have_bzip2, SHOW_BOOL}, + {"have_snappy", &innodb_have_snappy, SHOW_BOOL}, + {"have_punch_hole", &innodb_have_punch_hole, SHOW_BOOL}, /* Defragmentation */ {"defragment_compression_failures", - (char*) &export_vars.innodb_defragment_compression_failures, SHOW_LONG}, - {"defragment_failures", - (char*) &export_vars.innodb_defragment_failures, SHOW_LONG}, - {"defragment_count", - (char*) &export_vars.innodb_defragment_count, SHOW_LONG}, + &export_vars.innodb_defragment_compression_failures, SHOW_SIZE_T}, + {"defragment_failures", &export_vars.innodb_defragment_failures,SHOW_SIZE_T}, + {"defragment_count", &export_vars.innodb_defragment_count, SHOW_SIZE_T}, {"instant_alter_column", - (char*) &export_vars.innodb_instant_alter_column, SHOW_LONG}, + &export_vars.innodb_instant_alter_column, SHOW_ULONG}, /* Online alter table status variables */ {"onlineddl_rowlog_rows", - (char*) &export_vars.innodb_onlineddl_rowlog_rows, SHOW_LONG}, + &export_vars.innodb_onlineddl_rowlog_rows, SHOW_SIZE_T}, {"onlineddl_rowlog_pct_used", - (char*) &export_vars.innodb_onlineddl_rowlog_pct_used, SHOW_LONG}, + &export_vars.innodb_onlineddl_rowlog_pct_used, SHOW_SIZE_T}, {"onlineddl_pct_progress", - (char*) &export_vars.innodb_onlineddl_pct_progress, SHOW_LONG}, + &export_vars.innodb_onlineddl_pct_progress, SHOW_SIZE_T}, /* Times secondary index lookup triggered cluster lookup and times prefix optimization avoided triggering cluster lookup */ {"secondary_index_triggered_cluster_reads", - (char*) &export_vars.innodb_sec_rec_cluster_reads, SHOW_LONG}, + &export_vars.innodb_sec_rec_cluster_reads, SHOW_SIZE_T}, {"secondary_index_triggered_cluster_reads_avoided", - (char*) &export_vars.innodb_sec_rec_cluster_reads_avoided, SHOW_LONG}, + &export_vars.innodb_sec_rec_cluster_reads_avoided, SHOW_SIZE_T}, /* Encryption */ {"encryption_rotation_pages_read_from_cache", - (char*) &export_vars.innodb_encryption_rotation_pages_read_from_cache, - SHOW_LONG}, + &export_vars.innodb_encryption_rotation_pages_read_from_cache, SHOW_SIZE_T}, {"encryption_rotation_pages_read_from_disk", - (char*) &export_vars.innodb_encryption_rotation_pages_read_from_disk, - SHOW_LONG}, + &export_vars.innodb_encryption_rotation_pages_read_from_disk, SHOW_SIZE_T}, {"encryption_rotation_pages_modified", - (char*) &export_vars.innodb_encryption_rotation_pages_modified, - SHOW_LONG}, + &export_vars.innodb_encryption_rotation_pages_modified, SHOW_SIZE_T}, {"encryption_rotation_pages_flushed", - (char*) &export_vars.innodb_encryption_rotation_pages_flushed, - SHOW_LONG}, + &export_vars.innodb_encryption_rotation_pages_flushed, SHOW_SIZE_T}, {"encryption_rotation_estimated_iops", - (char*) &export_vars.innodb_encryption_rotation_estimated_iops, - SHOW_LONG}, + &export_vars.innodb_encryption_rotation_estimated_iops, SHOW_SIZE_T}, {"encryption_key_rotation_list_length", - (char*)&export_vars.innodb_key_rotation_list_length, - SHOW_LONGLONG}, + &export_vars.innodb_key_rotation_list_length, SHOW_LONGLONG}, {"encryption_n_merge_blocks_encrypted", - (char*)&export_vars.innodb_n_merge_blocks_encrypted, - SHOW_LONGLONG}, + &export_vars.innodb_n_merge_blocks_encrypted, SHOW_LONGLONG}, {"encryption_n_merge_blocks_decrypted", - (char*)&export_vars.innodb_n_merge_blocks_decrypted, - SHOW_LONGLONG}, + &export_vars.innodb_n_merge_blocks_decrypted, SHOW_LONGLONG}, {"encryption_n_rowlog_blocks_encrypted", - (char*)&export_vars.innodb_n_rowlog_blocks_encrypted, - SHOW_LONGLONG}, + &export_vars.innodb_n_rowlog_blocks_encrypted, SHOW_LONGLONG}, {"encryption_n_rowlog_blocks_decrypted", - (char*)&export_vars.innodb_n_rowlog_blocks_decrypted, - SHOW_LONGLONG}, + &export_vars.innodb_n_rowlog_blocks_decrypted, SHOW_LONGLONG}, /* scrubing */ {"scrub_background_page_reorganizations", - (char*) &export_vars.innodb_scrub_page_reorganizations, - SHOW_LONG}, - {"scrub_background_page_splits", - (char*) &export_vars.innodb_scrub_page_splits, - SHOW_LONG}, + &export_vars.innodb_scrub_page_reorganizations, SHOW_SIZE_T}, + {"scrub_background_page_splits", &export_vars.innodb_scrub_page_splits, + SHOW_SIZE_T}, {"scrub_background_page_split_failures_underflow", - (char*) &export_vars.innodb_scrub_page_split_failures_underflow, - SHOW_LONG}, + &export_vars.innodb_scrub_page_split_failures_underflow, SHOW_SIZE_T}, {"scrub_background_page_split_failures_out_of_filespace", - (char*) &export_vars.innodb_scrub_page_split_failures_out_of_filespace, - SHOW_LONG}, + &export_vars.innodb_scrub_page_split_failures_out_of_filespace,SHOW_SIZE_T}, {"scrub_background_page_split_failures_missing_index", - (char*) &export_vars.innodb_scrub_page_split_failures_missing_index, - SHOW_LONG}, + &export_vars.innodb_scrub_page_split_failures_missing_index, SHOW_SIZE_T}, {"scrub_background_page_split_failures_unknown", - (char*) &export_vars.innodb_scrub_page_split_failures_unknown, - SHOW_LONG}, - {"scrub_log", - (char*) &export_vars.innodb_scrub_log, + &export_vars.innodb_scrub_page_split_failures_unknown, SHOW_SIZE_T}, + {"scrub_log", &export_vars.innodb_scrub_log, SHOW_LONGLONG}, + {"encryption_num_key_requests", &export_vars.innodb_encryption_key_requests, SHOW_LONGLONG}, - {"encryption_num_key_requests", - (char*) &export_vars.innodb_encryption_key_requests, SHOW_LONGLONG}, {NullS, NullS, SHOW_LONG} }; diff --git a/storage/innobase/include/buf0flu.h b/storage/innobase/include/buf0flu.h index 23d14797510..20fc7240efc 100644 --- a/storage/innobase/include/buf0flu.h +++ b/storage/innobase/include/buf0flu.h @@ -31,6 +31,9 @@ Created 11/5/1995 Heikki Tuuri #include "log0log.h" #include "buf0types.h" +/** Number of pages flushed through non flush_list flushes. */ +extern ulint buf_lru_flush_page_count; + /** Flag indicating if the page_cleaner is in active state. */ extern bool buf_page_cleaner_is_active; diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h index 568320457f9..bf115c0dbeb 100644 --- a/storage/innobase/include/dict0dict.h +++ b/storage/innobase/include/dict0dict.h @@ -1580,6 +1580,23 @@ public: mutex_exit(&mutex); rw_lock_x_unlock(&latch); } + + /** Estimate the used memory occupied by the data dictionary + table and index objects. + @return number of bytes occupied */ + ulint rough_size() const + { + /* No mutex; this is a very crude approximation anyway */ + ulint size = UT_LIST_GET_LEN(table_LRU) + UT_LIST_GET_LEN(table_non_LRU); + size *= sizeof(dict_table_t) + + sizeof(dict_index_t) * 2 + + (sizeof(dict_col_t) + sizeof(dict_field_t)) * 10 + + sizeof(dict_field_t) * 5 /* total number of key fields */ + + 200; /* arbitrary, covering names and overhead */ + size += (table_hash->n_cells + table_id_hash->n_cells + + temp_id_hash->n_cells) * sizeof(hash_cell_t); + return size; + } }; /** the data dictionary cache */ @@ -1801,13 +1818,6 @@ dict_table_decode_n_col( ulint* n_col, ulint* n_v_col); -/** Calculate the used memory occupied by the data dictionary -table and index objects. -@return number of bytes occupied. */ -UNIV_INTERN -ulint -dict_sys_get_size(); - /** Look for any dictionary objects that are found in the given tablespace. @param[in] space_id Tablespace ID to search for. @return true if tablespace is empty. */ diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index a5bd790b741..8e4d8f4e835 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -90,6 +90,10 @@ struct srv_stats_t doublewrite buffer */ ulint_ctr_1_t dblwr_pages_written; +#if defined(LINUX_NATIVE_AIO) + ulint_ctr_1_t buffered_aio_submitted; +#endif + /** Store the number of write requests issued */ ulint_ctr_1_t buf_pool_write_requests; @@ -184,6 +188,9 @@ struct srv_stats_t /** Number of spaces in keyrotation list */ ulint_ctr_64_t key_rotation_list_length; + + /** Number of lock deadlocks */ + ulint_ctr_1_t lock_deadlock_count; }; extern const char* srv_main_thread_op_info; @@ -511,6 +518,12 @@ extern uint srv_spin_wait_delay; extern ulint srv_truncated_status_writes; /** Number of initialized rollback segments for persistent undo log */ extern ulong srv_available_undo_logs; +/** Iterations of the loop bounded by 'srv_active' label. */ +extern ulint srv_main_active_loops; +/** Iterations of the loop bounded by the 'srv_idle' label. */ +extern ulint srv_main_idle_loops; +/** Log writes involving flush. */ +extern ulint srv_log_writes_and_flush; #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG extern my_bool srv_ibuf_disable_background_merge; @@ -900,14 +913,6 @@ srv_master_thread_disabled_debug_update(THD*, st_mysql_sys_var*, void*, /** Status variables to be passed to MySQL */ struct export_var_t{ - ulint innodb_data_pending_reads; /*!< Pending reads */ - ulint innodb_data_pending_writes; /*!< Pending writes */ - ulint innodb_data_pending_fsyncs; /*!< Pending fsyncs */ - ulint innodb_data_fsyncs; /*!< Number of fsyncs so far */ - ulint innodb_data_read; /*!< Data bytes read */ - ulint innodb_data_writes; /*!< I/O write requests */ - ulint innodb_data_written; /*!< Data bytes written */ - ulint innodb_data_reads; /*!< I/O read requests */ char innodb_buffer_pool_dump_status[OS_FILE_MAX_PATH + 128];/*!< Buf pool dump status */ char innodb_buffer_pool_load_status[OS_FILE_MAX_PATH + 128];/*!< Buf pool load status */ char innodb_buffer_pool_resize_status[512];/*!< Buf pool resize status */ @@ -922,6 +927,9 @@ struct export_var_t{ #ifdef UNIV_DEBUG ulint innodb_buffer_pool_pages_latched; /*!< Latched pages */ #endif /* UNIV_DEBUG */ + ulint innodb_buffer_pool_pages_made_not_young; + ulint innodb_buffer_pool_pages_made_young; + ulint innodb_buffer_pool_pages_old; ulint innodb_buffer_pool_read_requests; /*!< buf_pool->stat.n_page_gets */ ulint innodb_buffer_pool_reads; /*!< srv_buf_pool_reads */ ulint innodb_buffer_pool_wait_free; /*!< srv_buf_pool_wait_free */ @@ -930,17 +938,35 @@ struct export_var_t{ ulint innodb_buffer_pool_read_ahead_rnd;/*!< srv_read_ahead_rnd */ ulint innodb_buffer_pool_read_ahead; /*!< srv_read_ahead */ ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/ + ulint innodb_checkpoint_age; + ulint innodb_checkpoint_max_age; + ulint innodb_data_pending_reads; /*!< Pending reads */ + ulint innodb_data_pending_writes; /*!< Pending writes */ + ulint innodb_data_pending_fsyncs; /*!< Pending fsyncs */ + ulint innodb_data_fsyncs; /*!< Number of fsyncs so far */ + ulint innodb_data_read; /*!< Data bytes read */ + ulint innodb_data_writes; /*!< I/O write requests */ + ulint innodb_data_written; /*!< Data bytes written */ + ulint innodb_data_reads; /*!< I/O read requests */ ulint innodb_dblwr_pages_written; /*!< srv_dblwr_pages_written */ ulint innodb_dblwr_writes; /*!< srv_dblwr_writes */ - ibool innodb_have_atomic_builtins; /*!< HAVE_ATOMIC_BUILTINS */ + ulint innodb_deadlocks; + ulint innodb_history_list_length; ulint innodb_log_waits; /*!< srv_log_waits */ ulint innodb_log_write_requests; /*!< srv_log_write_requests */ ulint innodb_log_writes; /*!< srv_log_writes */ + lsn_t innodb_lsn_current; + lsn_t innodb_lsn_flushed; + lsn_t innodb_lsn_last_checkpoint; + trx_id_t innodb_max_trx_id; +#ifdef BTR_CUR_HASH_ADAPT + ulint innodb_mem_adaptive_hash; +#endif + ulint innodb_mem_dictionary; lsn_t innodb_os_log_written; /*!< srv_os_log_written */ ulint innodb_os_log_fsyncs; /*!< fil_n_log_flushes */ ulint innodb_os_log_pending_writes; /*!< srv_os_log_pending_writes */ ulint innodb_os_log_pending_fsyncs; /*!< fil_n_pending_log_flushes */ - ulint innodb_page_size; /*!< srv_page_size */ ulint innodb_pages_created; /*!< buf_pool->stat.n_pages_created */ ulint innodb_pages_read; /*!< buf_pool->stat.n_pages_read*/ ulint innodb_pages_written; /*!< buf_pool->stat.n_pages_written */ @@ -963,6 +989,7 @@ struct export_var_t{ ulint innodb_system_rows_deleted; /*!< srv_n_system_rows_deleted*/ ulint innodb_num_open_files; /*!< fil_system_t::n_open */ ulint innodb_truncated_status_writes; /*!< srv_truncated_status_writes */ + /** Number of undo tablespace truncation operations */ ulong innodb_undo_truncations; ulint innodb_defragment_compression_failures; /*!< Number of diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index b23d5e2936f..c2e1b6b068b 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -6973,6 +6973,7 @@ DeadlockChecker::check_and_resolve(const lock_t* lock, trx_t* trx) rollback_print(victim_trx, lock); MONITOR_INC(MONITOR_DEADLOCK); + srv_stats.lock_deadlock_count.inc(); break; @@ -6985,6 +6986,7 @@ DeadlockChecker::check_and_resolve(const lock_t* lock, trx_t* trx) lock_deadlock_found = true; MONITOR_INC(MONITOR_DEADLOCK); + srv_stats.lock_deadlock_count.inc(); } } while (victim_trx != NULL && victim_trx != trx); diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 3ff56a53ebf..22a8e83761a 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -1668,6 +1668,7 @@ LinuxAIOHandler::resubmit(Slot* slot) /* Resubmit an I/O request */ int ret = io_submit(m_array->io_ctx(m_segment), 1, &iocb); + srv_stats.buffered_aio_submitted.inc(); if (ret < -1) { errno = -ret; @@ -2032,6 +2033,7 @@ AIO::linux_dispatch(Slot* slot) io_ctx_index = (slot->pos * m_n_segments) / m_slots.size(); int ret = io_submit(m_aio_ctx[io_ctx_index], 1, &iocb); + srv_stats.buffered_aio_submitted.inc(); /* io_submit() returns number of successfully queued requests or -errno. */ @@ -2214,6 +2216,7 @@ AIO::is_linux_native_aio_supported() } int err = io_submit(io_ctx, 1, &p_iocb); + srv_stats.buffered_aio_submitted.inc(); if (err >= 1) { /* Now collect the submitted IO request. */ diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 8d8098dc902..aa452339031 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -448,13 +448,13 @@ static ulint srv_main_thread_id; /* The following counts are used by the srv_master_thread. */ /** Iterations of the loop bounded by 'srv_active' label. */ -static ulint srv_main_active_loops; +ulint srv_main_active_loops; /** Iterations of the loop bounded by the 'srv_idle' label. */ -static ulint srv_main_idle_loops; +ulint srv_main_idle_loops; /** Iterations of the loop bounded by the 'srv_shutdown' label. */ static ulint srv_main_shutdown_loops; /** Log writes involving flush. */ -static ulint srv_log_writes_and_flush; +ulint srv_log_writes_and_flush; /* This is only ever touched by the master thread. It records the time when the last flush of log file has happened. The master @@ -1312,7 +1312,7 @@ srv_printf_innodb_monitor( "Total large memory allocated " ULINTPF "\n" "Dictionary memory allocated " ULINTPF "\n", ulint{os_total_large_mem_allocated}, - dict_sys_get_size()); + dict_sys.rough_size()); buf_print_io(file); @@ -1421,6 +1421,27 @@ srv_export_innodb_status(void) btr_scrub_total_stat(&scrub_stat); } +#ifdef BTR_CUR_HASH_ADAPT + ulint mem_adaptive_hash = 0; + ut_ad(btr_search_sys->hash_tables); + for (ulong i = 0; i < btr_ahi_parts; i++) { + hash_table_t* ht = btr_search_sys->hash_tables[i]; + + ut_ad(ht); + ut_ad(ht->heap); + /* Multiple mutexes/heaps are currently never used for adaptive + hash index tables. */ + ut_ad(!ht->n_sync_obj); + ut_ad(!ht->heaps); + + mem_adaptive_hash += mem_heap_get_size(ht->heap) + + ht->n_cells * sizeof(hash_cell_t); + } + export_vars.innodb_mem_adaptive_hash = mem_adaptive_hash; +#endif + + export_vars.innodb_mem_dictionary = dict_sys.rough_size(); + mutex_enter(&srv_innodb_monitor_mutex); export_vars.innodb_data_pending_reads = @@ -1473,6 +1494,18 @@ srv_export_innodb_status(void) export_vars.innodb_buffer_pool_pages_dirty = flush_list_len; + export_vars.innodb_buffer_pool_pages_made_young + = stat.n_pages_made_young; + export_vars.innodb_buffer_pool_pages_made_not_young + = stat.n_pages_not_made_young; + + export_vars.innodb_buffer_pool_pages_old = 0; + + for (ulong i = 0; i < srv_buf_pool_instances; i++) { + export_vars.innodb_buffer_pool_pages_old += + buf_pool_from_array(i)->LRU_old_len; + } + export_vars.innodb_buffer_pool_bytes_dirty = buf_pools_list_size.flush_list_bytes; @@ -1487,13 +1520,8 @@ srv_export_innodb_status(void) export_vars.innodb_buffer_pool_pages_misc = buf_pool_get_n_pages() - LRU_len - free_len; -#ifdef HAVE_ATOMIC_BUILTINS - export_vars.innodb_have_atomic_builtins = 1; -#else - export_vars.innodb_have_atomic_builtins = 0; -#endif - - export_vars.innodb_page_size = srv_page_size; + export_vars.innodb_max_trx_id = trx_sys.get_max_trx_id(); + export_vars.innodb_history_list_length = trx_sys.rseg_history_len; export_vars.innodb_log_waits = srv_stats.log_waits; @@ -1594,37 +1622,48 @@ srv_export_innodb_status(void) srv_stats.n_sec_rec_cluster_reads_avoided; if (!srv_read_only_mode) { - export_vars.innodb_encryption_rotation_pages_read_from_cache = - crypt_stat.pages_read_from_cache; - export_vars.innodb_encryption_rotation_pages_read_from_disk = - crypt_stat.pages_read_from_disk; - export_vars.innodb_encryption_rotation_pages_modified = - crypt_stat.pages_modified; - export_vars.innodb_encryption_rotation_pages_flushed = - crypt_stat.pages_flushed; - export_vars.innodb_encryption_rotation_estimated_iops = - crypt_stat.estimated_iops; - export_vars.innodb_encryption_key_requests = - srv_stats.n_key_requests; - export_vars.innodb_key_rotation_list_length = - srv_stats.key_rotation_list_length; - - export_vars.innodb_scrub_page_reorganizations = - scrub_stat.page_reorganizations; - export_vars.innodb_scrub_page_splits = - scrub_stat.page_splits; - export_vars.innodb_scrub_page_split_failures_underflow = - scrub_stat.page_split_failures_underflow; - export_vars.innodb_scrub_page_split_failures_out_of_filespace = - scrub_stat.page_split_failures_out_of_filespace; - export_vars.innodb_scrub_page_split_failures_missing_index = - scrub_stat.page_split_failures_missing_index; - export_vars.innodb_scrub_page_split_failures_unknown = - scrub_stat.page_split_failures_unknown; - export_vars.innodb_scrub_log = srv_stats.n_log_scrubs; + export_vars.innodb_encryption_rotation_pages_read_from_cache = + crypt_stat.pages_read_from_cache; + export_vars.innodb_encryption_rotation_pages_read_from_disk = + crypt_stat.pages_read_from_disk; + export_vars.innodb_encryption_rotation_pages_modified = + crypt_stat.pages_modified; + export_vars.innodb_encryption_rotation_pages_flushed = + crypt_stat.pages_flushed; + export_vars.innodb_encryption_rotation_estimated_iops = + crypt_stat.estimated_iops; + export_vars.innodb_encryption_key_requests = + srv_stats.n_key_requests; + export_vars.innodb_key_rotation_list_length = + srv_stats.key_rotation_list_length; + + export_vars.innodb_scrub_page_reorganizations = + scrub_stat.page_reorganizations; + export_vars.innodb_scrub_page_splits = + scrub_stat.page_splits; + export_vars.innodb_scrub_page_split_failures_underflow = + scrub_stat.page_split_failures_underflow; + export_vars.innodb_scrub_page_split_failures_out_of_filespace = + scrub_stat.page_split_failures_out_of_filespace; + export_vars.innodb_scrub_page_split_failures_missing_index = + scrub_stat.page_split_failures_missing_index; + export_vars.innodb_scrub_page_split_failures_unknown = + scrub_stat.page_split_failures_unknown; + export_vars.innodb_scrub_log = srv_stats.n_log_scrubs; } mutex_exit(&srv_innodb_monitor_mutex); + + log_mutex_enter(); + + export_vars.innodb_lsn_current = log_sys.lsn; + export_vars.innodb_lsn_flushed = log_sys.flushed_to_disk_lsn; + export_vars.innodb_lsn_last_checkpoint = log_sys.last_checkpoint_lsn; + export_vars.innodb_checkpoint_age = log_sys.lsn + - log_sys.last_checkpoint_lsn; + export_vars.innodb_checkpoint_max_age = log_sys.max_checkpoint_age; + + log_mutex_exit(); } /*********************************************************************//** |