 |
MySQL
8.0.23
Source Code Documentation
|
Go to the documentation of this file.
57 #ifndef UNIV_HOTBACKUP
294 #ifdef INNODB_DD_TABLE
318 #define SRV_BUF_DUMP_FILENAME_DEFAULT "ib_buffer_pool"
337 #define SRV_AUTO_EXTEND_INCREMENT (srv_sys_space.get_autoextend_increment())
339 #ifndef UNIV_HOTBACKUP
426 #define INITIAL_UNDO_SPACE_SIZE (16 * 1024 * 1024)
427 #define INITIAL_UNDO_SPACE_SIZE_IN_PAGES \
428 static_cast<os_offset_t>(INITIAL_UNDO_SPACE_SIZE / UNIV_PAGE_SIZE)
440 #define SRV_N_LOG_FILES_CLONE_MAX 1000
443 #define SRV_N_LOG_FILES_MAX 100
446 #ifdef UNIV_DEBUG_DEDICATED
447 extern ulong srv_debug_system_mem_size;
638 #define SRV_MAX_IO_CAPACITY_DUMMY_DEFAULT (~0UL)
639 #define SRV_MAX_IO_CAPACITY_LIMIT (~0UL)
644 #define PCT_IO(p) ((ulong)(srv_io_capacity * ((double)(p) / 100.0)))
647 #define MAX_PURGE_THREADS 32
709 #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
727 #ifdef UNIV_HOTBACKUP
729 #define SRV_MAX_N_IO_THREADS 1
731 #define SRV_MAX_N_IO_THREADS 130
761 #ifndef UNIV_HOTBACKUP
767 #ifdef UNIV_PFS_THREAD
803 #ifdef HAVE_PSI_STAGE_INTERFACE
882 enum srv_win_flush_t {
884 SRV_WIN_IO_UNBUFFERED = 0,
888 extern enum srv_win_flush_t srv_win_file_flush_method;
891 return (srv_win_file_flush_method == SRV_WIN_IO_UNBUFFERED);
973 #define srv_active_wake_master_thread() \
975 if (!srv_read_only_mode) { \
976 srv_active_wake_master_thread_low(); \
981 #ifndef UNIV_HOTBACKUP
1109 void *var_ptr,
const void *save);
1199 #ifndef UNIV_HOTBACKUP
ib_mutex_t srv_misc_tmpfile_mutex
Mutex for locking srv_misc_tmpfile.
Definition: srv0srv.cc:592
void srv_purge_wakeup(void)
Wakeup the purge threads.
Definition: srv0srv.cc:3308
ulong srv_n_page_hash_locks
Number of locks to protect buf_pool->page_hash.
Definition: srv0srv.cc:406
bool srv_buf_pool_debug
This is used to enable multiple buffer pool instances with small buffer pool size.
Definition: buf0buf.cc:324
bool srv_is_direct_io()
Definition: srv0srv.h:875
ulong srv_debug_compress
Force all user tables to use page compression.
Definition: srv0srv.cc:210
uint64_t lsn_t
Type used for all log sequence number storage and arithmetics.
Definition: log0types.h:60
ulint innodb_row_lock_current_waits
srv_n_lock_wait_current_count
Definition: srv0srv.h:1161
Log_DDL * log_ddl
Object to handle Log_DDL.
Definition: log0ddl.cc:60
mysql_pfs_key_t log_writer_thread_key
ulint innodb_rows_deleted
srv_n_rows_deleted
Definition: srv0srv.h:1172
void srv_que_task_enqueue_low(que_thr_t *thr)
Enqueues a task to server task queue and releases a worker thread, if there is a suspended one.
Definition: srv0srv.cc:3279
char innodb_buffer_pool_load_status[OS_FILE_MAX_PATH+128]
Buf pool load status.
Definition: srv0srv.h:1126
Definition: sql_class.h:807
void srv_wake_purge_thread_if_not_active(void)
Tells the purge thread that there has been activity in the database and wakes up the purge thread if ...
Definition: srv0srv.cc:1909
ulint innodb_buffer_pool_wait_free
srv_buf_pool_wait_free
Definition: srv0srv.h:1140
os_event_t srv_buf_resize_event
The buffer pool resize thread waits on this event.
Definition: srv0srv.cc:745
void srv_monitor_thread()
A thread which prints the info output by various InnoDB monitors.
Definition: srv0srv.cc:1705
ulong srv_adaptive_flushing_lwm
Definition: srv0srv.cc:468
lint_ctr_1_t os_log_pending_writes
Number of writes being done to the log files.
Definition: srv0srv.h:90
ulint innodb_buffer_pool_pages_flushed
srv_buf_pool_flushed
Definition: srv0srv.h:1141
void srv_error_monitor_thread()
A thread which prints warnings about semaphore waits which have lasted too long.
Definition: srv0srv.cc:1781
mysql_pfs_key_t log_write_notifier_thread_key
IB_thread m_fts_optimize
Thread doing optimization for FTS index.
Definition: srv0srv.h:240
ulong srv_log_wait_for_write_spin_delay
Number of spin iterations, when spinning and waiting for log buffer written up to given LSN,...
Definition: srv0srv.cc:292
ulint innodb_truncated_status_writes
srv_truncated_status_writes
Definition: srv0srv.h:1180
PSI_stage_info srv_stage_clone_redo_copy
Performance schema stage event for monitoring clone redo copy progress.
Definition: srv0srv.cc:816
ulint innodb_rows_updated
srv_n_rows_updated
Definition: srv0srv.h:1171
srv_unix_flush_t
Alternatives for the file flush option in Unix.
Definition: srv0srv.h:852
IB_thread m_buf_resize
Buffer pool resize thread.
Definition: srv0srv.h:193
ulint_ctr_1_t buf_pool_flushed
Count the number of pages that were written from buffer pool to the disk.
Definition: srv0srv.h:113
unsigned long long srv_online_max_size
Maximum modification log file size for online index creation.
Definition: srv0srv.cc:193
bool srv_stats_include_delete_marked
Definition: srv0srv.cc:541
IB_thread m_backup_log_archiver
Redo log archiver (used by backup).
Definition: srv0srv.h:187
bool srv_enable_redo_encryption(bool is_boot)
Enable REDO log encryption.
Definition: srv0srv.cc:2516
ulint innodb_sampled_pages_read
Definition: srv0srv.h:1177
PSI_stage_info srv_stage_alter_table_log_index
Performance schema stage event for monitoring ALTER TABLE progress row_log_apply().
Definition: srv0srv.cc:779
bool srv_thread_is_stopped(const IB_thread &thread)
Check if given thread is cleaned-up and stopped.
Definition: srv0srv.cc:3350
IB_thread m_log_flush_notifier
Redo flush notifier thread.
Definition: srv0srv.h:184
ulong srv_log_recent_written_size
Number of slots in a small buffer, which is used to allow concurrent writes to log buffer.
Definition: srv0srv.cc:282
uint srv_flush_log_at_timeout
Definition: srv0srv.cc:358
ulint innodb_system_rows_read
srv_n_system_rows_read
Definition: srv0srv.h:1173
ulong srv_max_purge_lag
Maximum allowable purge history length.
Definition: trx0purge.cc:66
bool srv_validate_tablespace_paths
Whether to validate InnoDB tablespace paths on startup.
Definition: srv0srv.cc:408
ulint_ctr_1_t log_write_requests
Number of the log write requests done.
Definition: srv0srv.h:81
ulint_ctr_1_t dblwr_pages_written
Store the number of pages that have been flushed to the doublewrite buffer.
Definition: srv0srv.h:101
ib_counter_t< ulint, 64 > ulint_ctr_64_t
Definition: srv0srv.h:71
void undo_rotate_default_master_key()
Rotate default master key for UNDO tablespace.
Definition: srv0srv.cc:2463
ulint_ctr_64_t n_rows_inserted
Number of rows inserted.
Definition: srv0srv.h:141
ulong srv_n_page_cleaners
Definition: srv0srv.cc:456
ulint innodb_row_lock_time_avg
srv_n_lock_wait_time / 1000 / srv_n_lock_wait_count
Definition: srv0srv.h:1164
ulint innodb_sampled_pages_skipped
Definition: srv0srv.h:1178
int n_cpu
Definition: srv0srv.h:279
ulong srv_buf_pool_instances
Requested number of buffer pool instances.
Definition: srv0srv.cc:402
ulint_ctr_64_t n_sampled_pages_read
Number of sampled pages read.
Definition: srv0srv.h:156
mysql_pfs_key_t srv_purge_thread_key
bool srv_ibuf_disable_background_merge
Definition: ibuf0ibuf.cc:43
os_event_t srv_buf_dump_event
The buffer pool dump/load thread waits on this event.
Definition: srv0srv.cc:742
void srv_wake_master_thread(void)
Wakes up the master thread if it is suspended or being suspended.
Definition: srv0srv.cc:1919
void srv_purge_coordinator_thread()
Purge coordinator thread that schedules the purge tasks.
Definition: srv0srv.cc:3156
ulint_ctr_64_t n_rows_deleted
Number of rows deleted.
Definition: srv0srv.h:138
IB_thread m_page_cleaner_coordinator
Page cleaner coordinator (also being a worker).
Definition: srv0srv.h:224
const ulonglong srv_buf_pool_chunk_unit_min
Minimum buffer pool chunk size.
Definition: srv0srv.cc:395
ulint innodb_pages_written
buf_pool->stat.n_pages_written
Definition: srv0srv.h:1158
bool srv_load_corrupted
Definition: dict0load.cc:138
mysql_pfs_key_t io_read_thread_key
IB_thread m_page_archiver
Archiver's page archiver (used by Clone).
Definition: srv0srv.h:237
uint srv_log_spin_cpu_pct_hwm
Maximum percentage of cpu time for which spin-delay is used.
Definition: srv0srv.cc:259
ulint innodb_buffer_pool_pages_dirty
Dirty data pages.
Definition: srv0srv.h:1131
IB_thread m_dict_stats
Dict stats background thread.
Definition: srv0srv.h:196
dberr_t srv_undo_tablespace_create(const char *space_name, const char *file_name, space_id_t space_id)
Create an undo tablespace with an explicit file name This is called during CREATE UNDO TABLESPACE.
Definition: srv0start.cc:1399
Mini-transaction handle and buffer.
Definition: mtr0mtr.h:169
mysql_pfs_key_t dict_stats_thread_key
InnoDB condition variable.
Definition: os0event.cc:66
ulong srv_flush_neighbors
Whether or not to flush neighbors of a block.
Definition: srv0srv.cc:412
ulint innodb_buffer_pool_read_ahead_rnd
srv_read_ahead_rnd
Definition: srv0srv.h:1143
ulint_ctr_1_t n_lock_wait_count
Number of database lock waits.
Definition: srv0srv.h:126
ulong srv_log_writer_spin_delay
Number of spin iterations, for which log writer thread is waiting for new data to write or flush with...
Definition: srv0srv.cc:309
ib_mutex_t page_zip_stat_per_index_mutex
Mutex protecting page_zip_stat_per_index.
Definition: srv0srv.cc:582
ulint innodb_os_log_fsyncs
fil_n_log_flushes
Definition: srv0srv.h:1152
ulong srv_log_write_notifier_spin_delay
Number of spin iterations, for which log write notifier thread is waiting for advanced writeed_to_dis...
Definition: srv0srv.cc:328
ulint innodb_data_pending_fsyncs
Pending fsyncs.
Definition: srv0srv.h:1117
ulong srv_log_checkpoint_every
Number of milliseconds every which a periodical checkpoint is written by the log checkpointer thread ...
Definition: srv0srv.cc:317
char * srv_data_home
Definition: srv0srv.cc:128
ulint_ctr_1_t buf_pool_write_requests
Store the number of write requests issued.
Definition: srv0srv.h:104
PSI_stage_info srv_stage_clone_page_copy
Performance schema stage event for monitoring clone page copy progress.
Definition: srv0srv.cc:820
ulint srv_truncated_status_writes
Definition: srv0srv.cc:564
long long int longlong
Definition: my_inttypes.h:54
que_thr_t * thr
Suspended query thread (only used for user threads).
Definition: srv0srv.h:1233
ulong srv_io_capacity
Definition: srv0srv.cc:452
double utime_pct
Definition: srv0srv.h:282
enum srv_unix_flush_t srv_unix_file_flush_method
Definition: srv0srv.cc:444
ulint innodb_data_read
Data bytes read.
Definition: srv0srv.h:1119
bool srv_redo_log_encrypt
Enable or Disable Encrypt of REDO tablespace.
Definition: srv0srv.cc:225
double stime_abs
Definition: srv0srv.h:281
dberr_t
Definition: db0err.h:38
@ SRV_STATS_NULLS_EQUAL
Definition: srv0srv.h:923
bool srv_printf_innodb_monitor(FILE *file, bool nowait, ulint *trx_start, ulint *trx_end)
Outputs to a file the output of the InnoDB Monitor.
Definition: srv0srv.cc:1292
ulint innodb_dblwr_pages_written
srv_dblwr_pages_written
Definition: srv0srv.h:1146
ulong srv_checksum_algorithm
the macro MYSQL_SYSVAR_ENUM() requires "long unsigned int" and if we use srv_checksum_algorithm_t her...
Definition: checksum.cc:55
ulong srv_sync_array_size
User configured sync array size.
Definition: sync0arr.cc:166
os_event_t srv_error_event
Event to signal the error thread.
Definition: srv0srv.cc:739
IB_thread * m_purge_workers
Purge workers.
Definition: srv0srv.h:221
ib_counter_t< ulint, 1, single_indexer_t > ulint_ctr_1_t
Definition: srv0srv.h:73
ulint innodb_system_rows_inserted
srv_n_system_rows_inserted
Definition: srv0srv.h:1174
ulint innodb_ahi_drop_lookups
number of adaptive hash index lookups when freeing file pages
Definition: srv0srv.h:1193
ulong srv_log_wait_for_write_timeout
Timeout used when waiting for redo write (microseconds).
Definition: srv0srv.cc:296
ib_counter_t< lsn_t, 1, single_indexer_t > lsn_ctr_1_t
Definition: srv0srv.h:72
@ SRV_STATS_NULLS_IGNORED
Definition: srv0srv.h:928
lsn_t innodb_os_log_written
srv_os_log_written
Definition: srv0srv.h:1151
bool srv_thread_is_active(const IB_thread &thread)
Check if given thread is still active.
Definition: srv0srv.cc:3346
ulint_ctr_1_t data_written
Count the amount of data written in total (in bytes)
Definition: srv0srv.h:78
ulong srv_log_writer_timeout
Initial timeout used to wait on writer_event.
Definition: srv0srv.cc:312
bool tbsp_extend_and_initialize
Enable or disable writing of NULLs while extending a tablespace.
Definition: srv0srv.cc:484
@ SRV_FORCE_NO_IBUF_MERGE
prevent also ibuf operations: if they would cause a crash, better not do them
Definition: srv0srv.h:909
Srv_threads srv_threads
Structure with state of srv background threads.
Definition: srv0srv.cc:97
@ SRV_UNIX_O_DIRECT
invoke os_file_set_nocache() on data files.
Definition: srv0srv.h:859
ulint innodb_row_lock_waits
srv_n_lock_wait_count
Definition: srv0srv.h:1160
void srv_active_wake_master_thread_low(void)
Tells the Innobase server that there has been activity in the database and wakes up the master thread...
Definition: srv0srv.cc:1873
ulonglong srv_buf_pool_chunk_unit
Requested buffer pool chunk size.
Definition: srv0srv.cc:393
@ SRV_MASTER
the master thread, (whose type number must be biggest)
Definition: srv0srv.h:945
char innodb_buffer_pool_dump_status[OS_FILE_MAX_PATH+128]
Buf pool dump status.
Definition: srv0srv.h:1124
bool srv_undo_log_truncate
Enable or Disable Truncate of UNDO tablespace.
Definition: srv0srv.cc:168
ulong srv_n_log_files
Definition: srv0srv.cc:227
lint_ctr_1_t n_lock_wait_current_count
Number of threads currently waiting on database locks.
Definition: srv0srv.h:129
bool set_undo_tablespace_encryption(space_id_t space_id, mtr_t *mtr, bool is_boot)
Set encryption for UNDO tablespace with given space id.
Definition: srv0srv.cc:2551
mysql_pfs_key_t io_ibuf_thread_key
ulint_ctr_64_t n_system_rows_deleted
Number of system rows deleted.
Definition: srv0srv.h:150
ulong srv_read_ahead_threshold
Definition: srv0srv.cc:437
bool srv_sync_debug
Definition: sync0debug.cc:60
IB_thread m_master
The master thread.
Definition: srv0srv.h:202
ulint innodb_os_log_pending_fsyncs
fil_n_pending_log_flushes
Definition: srv0srv.h:1154
mysql_pfs_key_t buf_resize_thread_key
ulong srv_log_flush_events
Number of events used for notifications about redo flush.
Definition: srv0srv.cc:277
ulint_ctr_64_t n_system_rows_inserted
Number of system rows inserted.
Definition: srv0srv.h:153
const char * srv_io_thread_function[]
Definition: srv0srv.cc:573
ulong srv_log_wait_for_flush_spin_delay
Number of spin iterations, when spinning and waiting for log flushed.
Definition: srv0srv.cc:300
os_event_t m_master_ready_for_dd_shutdown
When the master thread notices that shutdown has started (by noticing srv_shutdown_state >= SRV_SHUTD...
Definition: srv0srv.h:262
IB_thread m_log_write_notifier
Redo write notifier thread.
Definition: srv0srv.h:181
ulong srv_LRU_scan_depth
Scan depth for LRU flush batch i.e.
Definition: srv0srv.cc:410
bool srv_purge_threads_active()
Check if the purge threads are active, both coordinator and worker threads.
Definition: srv0srv.cc:3325
ulong srv_rollback_segments
The number of rollback segments per tablespace.
Definition: srv0srv.cc:147
int n
Definition: xcom_base.cc:445
os_event_t srv_monitor_event
Event to signal the monitor thread.
Definition: srv0srv.cc:736
ulint_ctr_64_t n_rows_read
Number of rows read.
Definition: srv0srv.h:132
mysql_pfs_key_t log_flush_notifier_thread_key
mysql_pfs_key_t buf_dump_thread_key
double srv_max_dirty_pages_pct
bool srv_inject_too_many_concurrent_trxs
Definition: srv0srv.cc:353
bool srv_print_innodb_monitor
Definition: srv0srv.cc:566
bool srv_master_thread_disabled_debug
Value of MySQL global used to disable master thread.
Definition: srv0srv.cc:214
mysql_pfs_key_t io_log_thread_key
unsigned long long srv_stats_transient_sample_pages
Definition: srv0srv.cc:539
bool srv_enable_undo_encryption(bool is_boot)
Enable UNDO tablespaces encryption.
Definition: srv0srv.cc:2594
const ulonglong srv_buf_pool_chunk_unit_max
Maximum buffer pool chunk size.
Definition: srv0srv.cc:399
int64_ctr_1_t n_lock_wait_time
Wait time of database locks.
Definition: srv0srv.h:123
Structure which keeps shared future objects for InnoDB background threads.
Definition: srv0srv.h:164
@ SRV_UNIX_NOSYNC
do not flush after writing
Definition: srv0srv.h:858
bool srv_stats_auto_recalc
Definition: srv0srv.cc:543
IB_thread m_log_flusher
Redo flusher thread.
Definition: srv0srv.h:178
ulint srv_dml_needed_delay
Definition: srv0srv.cc:119
@ SRV_STATS_NULLS_UNEQUAL
Definition: srv0srv.h:926
ulint_ctr_1_t log_writes
Number of physical writes to the log performed.
Definition: srv0srv.h:84
double stime_pct
Definition: srv0srv.h:283
bool high_level_read_only
Set if InnoDB operates in read-only mode or innodb-force-recovery is greater than SRV_FORCE_NO_TRX_UN...
Definition: srv0srv.cc:196
ulong srv_log_write_events
Number of events used for notifications about redo write.
Definition: srv0srv.cc:274
@ SRV_UNIX_LITTLESYNC
do not call os_file_flush() when writing data files, but do flush after writing to log files
Definition: srv0srv.h:855
ulong srv_adaptive_max_sleep_delay
Maximum sleep delay (in micro-seconds), value of 0 disables it.
Definition: srv0conc.cc:62
bool srv_master_thread_is_active()
Check whether the master thread is active.
Definition: srv0srv.cc:1864
bool srv_flush_sync
Definition: srv0srv.cc:369
mysql_pfs_key_t recv_writer_thread_key
char * srv_log_group_home_dir
Definition: srv0srv.cc:222
ulint_ctr_1_t log_waits
We increase this counter, when we don't have enough space in the log buffer and have to flush it.
Definition: srv0srv.h:94
ulint_ctr_64_t n_system_rows_updated
Number of system rows updated.
Definition: srv0srv.h:147
Class to write and replay ddl logs.
Definition: log0ddl.h:404
ulint innodb_data_written
Data bytes written.
Definition: srv0srv.h:1121
mysql_pfs_key_t io_write_thread_key
ulong srv_log_write_ahead_size
Size of block, used for writing ahead to avoid read-on-write.
Definition: srv0srv.h:568
srv_stats_method_name_enum
Definition: srv0srv.h:922
PSI_stage_info srv_stage_alter_table_insert
Performance schema stage event for monitoring ALTER TABLE progress row_merge_insert_index_tuples().
Definition: srv0srv.cc:774
ulong srv_max_io_capacity
Definition: srv0srv.cc:453
ulong srv_log_recent_closed_size
Number of slots in a small buffer, which is used to break requirement for total order of dirty pages,...
Definition: srv0srv.cc:287
srv_thread_type type
Thread type: user, utility etc.
Definition: srv0srv.h:1203
void undo_spaces_init()
Initialize undo::spaces and trx_sys_undo_spaces, called once during srv_start().
Definition: srv0start.cc:1467
@ SRV_FORCE_IGNORE_CORRUPT
let the server run even if it detects a corrupt page
Definition: srv0srv.h:902
mysql_pfs_key_t clone_gtid_thread_key
@ SRV_UNIX_FSYNC
fsync, the default
Definition: srv0srv.h:853
@ SRV_UNIX_O_DSYNC
open log files in O_SYNC mode
Definition: srv0srv.h:854
@ SRV_WORKER
threads serving parallelized queries and queries released from lock wait
Definition: srv0srv.h:941
void undo_spaces_deinit()
Free the resources occupied by undo::spaces and trx_sys_undo_spaces, called once during thread de-ini...
Definition: srv0start.cc:1479
ulong srv_flush_log_at_trx_commit
Definition: srv0srv.cc:357
ulong srv_log_flusher_timeout
Initial timeout used to wait on flusher_event.
Definition: srv0srv.cc:324
bool srv_upgrade_old_undo_found
ulint innodb_purge_view_trx_id_age
rw_max_trx_no
Definition: srv0srv.h:1191
const ulong srv_buf_pool_instances_default
Default number of buffer pool instances.
Definition: srv0srv.cc:404
ulong srv_force_recovery
Normally 0.
Definition: srv0srv.cc:497
mysql_pfs_key_t srv_monitor_thread_key
mysql_pfs_key_t log_flusher_thread_key
bool srv_disable_sort_file_cache
Definition: row0merge.cc:70
bool srv_adaptive_flushing
Definition: srv0srv.cc:366
mysql_pfs_key_t fts_optimize_thread_key
@ SRV_FORCE_NO_BACKGROUND
prevent the main thread from running: if a crash would occur in purge, this prevents it
Definition: srv0srv.h:904
bool srv_downgrade_partition_files
Definition: srv0srv.cc:111
ulint innodb_data_pending_writes
Pending writes.
Definition: srv0srv.h:1116
ulint_ctr_1_t buf_pool_reads
Number of buffer pool reads that led to the reading of a disk page.
Definition: srv0srv.h:117
void srv_master_thread_disabled_debug_update(THD *thd, SYS_VAR *var, void *var_ptr, const void *save)
Disables master thread.
Definition: srv0srv.cc:2021
unsigned int uint
Definition: uca-dump.cc:29
Stage instrument information.
Definition: psi_stage_bits.h:73
const ulonglong srv_buf_pool_chunk_unit_blk_sz
The buffer pool chunk size must be a multiple of this number.
Definition: srv0srv.cc:397
void set_srv_redo_log(bool enable)
Set redo log variable for performance schema global status.
Definition: srv0srv.cc:3360
bool srv_undo_log_encrypt
Enable or disable Encrypt of UNDO tablespace.
Definition: srv0srv.cc:171
ulint innodb_row_lock_time_max
srv_n_lock_max_wait_time / 1000
Definition: srv0srv.h:1167
size_t m_purge_workers_n
Number of purge workers and size of array below.
Definition: srv0srv.h:217
mysql_pfs_key_t clone_ddl_thread_key
mysql_pfs_key_t srv_error_monitor_thread_key
ibool srv_innodb_status
Definition: srv0srv.cc:531
char * srv_innodb_directories
The innodb_directories variable value.
Definition: srv0srv.cc:135
char * srv_undo_dir
Server undo tablespaces directory, can be absolute path.
Definition: srv0srv.cc:139
PSI_stage_info srv_stage_alter_table_merge_sort
Performance schema stage event for monitoring ALTER TABLE progress row_merge_sort().
Definition: srv0srv.cc:791
IB_thread m_gtid_persister
Thread for GTID persistence.
Definition: srv0srv.h:243
ulint innodb_undo_tablespaces_active
number of active undo tablespaces
Definition: srv0srv.h:1187
mysql_pfs_key_t page_archiver_thread_key
uint srv_change_buffer_max_size
Maximum on-disk size of change buffer in terms of percentage of the buffer pool.
Definition: srv0srv.cc:441
mysql_pfs_key_t trx_recovery_rollback_thread_key
ulint_ctr_1_t dblwr_writes
Count the number of times the doublewrite buffer was flushed.
Definition: srv0srv.h:97
ulint srv_buf_pool_base_size
Current size as scaling factor for the other components.
Definition: srv0srv.cc:416
void srv_free(void)
Frees the data structures created in srv_init().
Definition: srv0srv.cc:1160
ib_time_monotonic_t suspend_time
Time when the thread was suspended.
Definition: srv0srv.h:1213
ulint innodb_buffer_pool_pages_data
Data pages.
Definition: srv0srv.h:1129
void srv_inc_activity_count(void)
Increment the server activity counter.
Definition: srv0srv.cc:1855
mysql_pfs_key_t fts_parallel_merge_thread_key
IB_thread m_recv_writer
Thread writing recovered pages during recovery.
Definition: srv0srv.h:211
Define for performance schema registration key.
Definition: sync0sync.h:50
double srv_max_buf_pool_modified_pct
Definition: srv0srv.cc:463
ulint innodb_num_open_files
fil_n_file_opened
Definition: srv0srv.h:1179
PSI_stage_info srv_stage_buffer_pool_load
Performance schema stage event for monitoring buffer pool load progress.
Definition: srv0srv.cc:807
char innodb_buffer_pool_resize_status[512]
Buf pool resize status.
Definition: srv0srv.h:1127
Definition: srv0srv.h:278
ulong srv_log_write_notifier_timeout
Initial timeout used to wait on write_notifier_event.
Definition: srv0srv.cc:332
ulint srv_n_file_io_threads
Number of IO threads to use.
Definition: srv0start.cc:136
ulint innodb_buffer_pool_reads
srv_buf_pool_reads
Definition: srv0srv.h:1139
mysql_pfs_key_t page_flush_thread_key
void srv_export_innodb_status(void)
Function to pass InnoDB status variables to MySQL.
Definition: srv0srv.cc:1512
ulong srv_flushing_avg_loops
Definition: srv0srv.cc:471
ulong srv_dblwr_pages
Number of pages per doublewrite thread/segment.
IB_thread m_monitor
Monitor thread (prints info).
Definition: srv0srv.h:166
bool innodb_redo_log_enabled
srv_redo_log
Definition: srv0srv.h:1159
Srv_cpu_usage srv_cpu_usage
Structure with cpu usage information.
Definition: srv0srv.cc:100
ulint_ctr_64_t n_system_rows_read
Number of system rows read.
Definition: srv0srv.h:144
bool srv_log_writer_threads
Whether to activate/pause the log writer threads.
Definition: srv0srv.cc:253
PSI_stage_info srv_stage_alter_table_flush
Performance schema stage event for monitoring ALTER TABLE progress log_make_latest_checkpoint().
Definition: srv0srv.cc:769
ulong srv_max_purge_lag_delay
Max DML user threads delay in micro-seconds.
Definition: trx0purge.cc:69
const std::string FILE("FILE")
ulint innodb_page_size
UNIV_PAGE_SIZE.
Definition: srv0srv.h:1155
ulint innodb_buffer_pool_pages_free
Free pages.
Definition: srv0srv.h:1134
void srv_boot(void)
Boots Innobase server.
Definition: srv0srv.cc:1231
void srv_reset_io_thread_op_info()
Resets the info describing an i/o thread current state.
Definition: srv0srv.cc:845
void srv_worker_thread()
Worker thread that reads tasks from the work queue and executes them.
Definition: srv0srv.cc:2905
ulint innodb_buffer_pool_bytes_dirty
File bytes modified.
Definition: srv0srv.h:1132
ulong srv_spin_wait_delay
Definition: ut0mutex.h:107
ulint innodb_data_fsyncs
Number of fsyncs so far.
Definition: srv0srv.h:1118
std::atomic< int > srv_fatal_semaphore_wait_extend
Definition: srv0srv.cc:115
char * srv_buf_dump_filename
The buffer pool dump/load file name.
Definition: srv0srv.cc:748
enum srv_stats_method_name_enum srv_stats_method_name_t
Definition: srv0srv.h:931
IB_thread m_lock_wait_timeout
Thread detecting lock wait timeouts.
Definition: srv0srv.h:199
ulint innodb_log_write_requests
srv_log_write_requests
Definition: srv0srv.h:1149
IB_thread m_buf_dump
Buffer pool dump thread.
Definition: srv0srv.h:190
Definition: os0thread.h:41
mysql_pfs_key_t parallel_read_thread_key
Status variables to be passed to MySQL.
Definition: srv0srv.h:1114
IB_thread m_error_monitor
Error monitor thread.
Definition: srv0srv.h:169
PSI_stage_info srv_stage_alter_table_end
Performance schema stage event for monitoring ALTER TABLE progress everything after flush log_make_la...
Definition: srv0srv.cc:764
@ SRV_FORCE_NO_UNDO_LOG_SCAN
do not look at undo logs when starting the database: InnoDB will treat even incomplete transactions a...
Definition: srv0srv.h:912
mysql_pfs_key_t page_flush_coordinator_thread_key
@ SRV_FORCE_NO_TRX_UNDO
do not run trx rollback after recovery
Definition: srv0srv.h:907
ulong srv_replication_delay
Definition: srv0srv.cc:545
const longlong srv_buf_pool_max_size
Maximum pool size in bytes.
Definition: srv0srv.cc:390
void srv_thread_delay_cleanup_if_needed(bool wait_for_signal)
Delay the thread after it discovered that the shutdown_state is greater or equal to SRV_SHUTDOWN_CLEA...
Definition: srv0start.cc:3494
ulint innodb_log_waits
srv_log_waits
Definition: srv0srv.h:1148
ulint innodb_rows_read
srv_n_rows_read
Definition: srv0srv.h:1169
unsigned long long srv_max_undo_tablespace_size
Maximum size of undo tablespace.
Definition: srv0srv.cc:174
const ulong srv_idle_flush_pct_default
Default value of srv_idle_flush_pct.
Definition: srv0srv.cc:424
void srv_set_io_thread_op_info(ulint i, const char *str)
Sets the info describing an i/o thread current state.
Definition: srv0srv.cc:838
ulint srv_lock_table_size
Lock table size in bytes.
Definition: srv0srv.cc:422
IB_thread m_ts_alter_encrypt
The ts_alter_encrypt thread.
Definition: srv0srv.h:205
ulint innodb_buffer_pool_pages_total
Buffer pool size.
Definition: srv0srv.h:1128
const ulint srv_buf_pool_min_size
Minimum pool size in bytes.
Definition: srv0srv.cc:386
mysql_pfs_key_t srv_ts_alter_encrypt_thread_key
ib_counter_t< lint, 1, single_indexer_t > lint_ctr_1_t
Definition: srv0srv.h:74
mysql_pfs_key_t srv_lock_timeout_thread_key
bool srv_numa_interleave
Definition: srv0srv.cc:206
bool srv_use_native_aio
If this flag is true, then we will use the native aio of the OS (provided we compiled Innobase with i...
Definition: srv0srv.cc:204
bool srv_read_only_mode
Set if InnoDB must operate in read-only mode.
Definition: srv0srv.cc:184
bool suspended
TRUE if the thread is waiting for the event of this slot.
Definition: srv0srv.h:1209
ib_counter_t< int64_t, 1, single_indexer_t > int64_ctr_1_t
Definition: srv0srv.h:75
ulong srv_n_free_tickets_to_enter
Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got t...
Definition: srv0conc.cc:59
bool srv_redo_log
If innodb redo logging is enabled.
Definition: srv0srv.cc:514
ibool srv_check_activity(ulint old_activity_count)
Check if there has been any activity.
Definition: srv0srv.cc:1936
double utime_abs
Definition: srv0srv.h:280
bool srv_print_innodb_lock_monitor
Definition: srv0srv.cc:567
const size_t CONCURRENT_UNDO_TRUNCATE_LIMIT
Maximum number of recently truncated undo tablespace IDs for the same undo number.
Definition: srv0srv.cc:178
bool srv_print_all_deadlocks
Print all user-level transactions deadlocks to mysqld stderr.
Definition: srv0srv.cc:505
ibool srv_priority_boost
Definition: srv0srv.cc:550
ulint innodb_pages_read
buf_pool->stat.n_pages_read
Definition: srv0srv.h:1157
ulong srv_thread_sleep_delay
Sleep delay for threads waiting to enter InnoDB.
Definition: srv0conc.cc:64
ulint srv_max_n_open_files
Definition: srv0srv.cc:449
ulong srv_idle_flush_pct
How much flush to be done in case of server is idle.
Definition: srv0srv.cc:425
mysql_pfs_key_t log_archiver_thread_key
ib_mutex_t srv_monitor_file_mutex
Definition: srv0srv.cc:585
bool srv_buffer_pool_load_at_startup
Definition: srv0srv.cc:753
const char * srv_main_thread_op_info
Definition: srv0srv.cc:121
const ulint srv_buf_pool_def_size
Default pool size in bytes.
Definition: srv0srv.cc:388
bool srv_dedicated_server
Dedicated server setting.
Definition: srv0srv.cc:382
ulint innodb_buffer_pool_write_requests
srv_buf_pool_write_requests
Definition: srv0srv.h:1142
bool srv_print_ddl_logs
Print all DDL logs to mysqld stderr.
Definition: srv0srv.cc:508
ulong srv_n_write_io_threads
Definition: srv0srv.cc:430
IB_thread * m_page_cleaner_workers
Page cleaner workers.
Definition: srv0srv.h:231
ulint innodb_purge_trx_id_age
rw_max_trx_no - purged trx_no
Definition: srv0srv.h:1190
bool srv_cmp_per_index_enabled
Enable INFORMATION_SCHEMA.innodb_cmp_per_index.
Definition: srv0srv.cc:511
ulint srv_get_task_queue_length(void)
Get count of tasks in the queue.
Definition: srv0srv.cc:3293
@ SRV_PURGE
Purge coordinator thread.
Definition: srv0srv.h:944
ulint innodb_buffer_pool_read_requests
buf_pool->stat.n_page_gets
Definition: srv0srv.h:1138
IB_thread m_log_writer
Redo writer thread.
Definition: srv0srv.h:175
uint64_t reservation_no
Stores the current value of lock_wait_table_reservations, when lock_wait_table_reserve_slot is called...
Definition: srv0srv.h:1223
ulint innodb_system_rows_deleted
srv_n_system_rows_deleted
Definition: srv0srv.h:1176
ulong srv_parallel_read_threads
Number of threads to use for parallel reads.
Definition: srv0srv.cc:199
size_t m_page_cleaner_workers_n
Number of page cleaner workers and size of array below.
Definition: srv0srv.h:227
PSI_stage_info srv_stage_alter_tablespace_encryption
Performance schema stage event for monitoring ALTER TABLESPACE ENCRYPTION progress.
Definition: srv0srv.cc:802
ulint innodb_undo_tablespaces_total
total number of undo tablespaces innoDB is tracking.
Definition: srv0srv.h:1181
ulonglong srv_log_file_size_requested
The value of the startup parameter innodb_log_file_size.
Definition: srv0srv.cc:242
ulong srv_n_spin_wait_rounds
Definition: ut0mutex.h:108
ulint_ctr_1_t buf_pool_wait_free
Store the number of times when we had to wait for a free page in the buffer pool.
Definition: srv0srv.h:109
mysql_pfs_key_t io_handler_thread_key
const char * srv_io_thread_op_info[]
Definition: srv0srv.cc:572
ulong wait_timeout
Wait time that if exceeded the thread will be timed out.
Definition: srv0srv.h:1227
ulong srv_force_recovery_crash
Inject a crash at different steps of the recovery process.
Definition: srv0srv.cc:501
ulint innodb_data_reads
I/O read requests.
Definition: srv0srv.h:1122
ulong srv_fatal_semaphore_wait_threshold
Definition: srv0srv.cc:114
IB_thread m_purge_coordinator
Purge coordinator (also being a worker)
Definition: srv0srv.h:214
mysql_pfs_key_t srv_worker_thread_key
ulint srv_buf_pool_old_size
Previously requested size.
Definition: srv0srv.cc:414
os_event_t m_shutdown_cleanup_dbg
Used in test scenario to delay threads' cleanup until the pre_dd_shutdown is ended and final plugin's...
Definition: srv0srv.h:250
ulonglong srv_log_file_size
At startup, this is the current redo log file size.
Definition: srv0srv.cc:239
bool in_use
TRUE if this slot is in use.
Definition: srv0srv.h:1206
uint32 space_id_t
Tablespace identifier.
Definition: api0api.h:59
IB_thread m_trx_recovery_rollback
Thread doing rollbacks during recovery.
Definition: srv0srv.h:208
ulong srv_fast_shutdown
The value of the configuration parameter innodb_fast_shutdown, controlling the InnoDB shutdown.
Definition: srv0srv.cc:528
ulong srv_purge_rseg_truncate_frequency
Rate at which UNDO records should be purged.
Definition: srv0srv.cc:159
ulint innodb_undo_tablespaces_explicit
number of undo tablespaces the dba created explicitly.
Definition: srv0srv.h:1185
ulong srv_log_flush_notifier_timeout
Initial timeout used to wait on flush_notifier_event.
Definition: srv0srv.cc:341
ulint innodb_buffer_pool_read_ahead
srv_read_ahead
Definition: srv0srv.h:1144
unsigned long long int ulonglong
Definition: my_inttypes.h:55
ulint innodb_os_log_pending_writes
srv_os_log_pending_writes
Definition: srv0srv.h:1153
#define OS_FILE_MAX_PATH
Definition: os0file.h:703
ulint innodb_buffer_pool_read_ahead_evicted
srv_read_ahead evicted
Definition: srv0srv.h:1145
ulong srv_log_buffer_size
Space for log buffer, expressed in bytes.
Definition: srv0srv.cc:247
PSI_stage_info srv_stage_clone_file_copy
Performance schema stage event for monitoring clone file copy progress.
Definition: srv0srv.cc:812
ulint innodb_buffer_pool_pages_misc
Miscellanous pages.
Definition: srv0srv.h:1133
ulong srv_log_wait_for_flush_timeout
Timeout used when waiting for redo flush (microseconds).
Definition: srv0srv.cc:304
bool srv_buffer_pool_dump_at_shutdown
Boolean config knobs that tell InnoDB to dump the buffer pool at shutdown and/or load it during start...
Definition: srv0srv.cc:752
ulint innodb_data_pending_reads
Pending reads.
Definition: srv0srv.h:1115
ulong srv_n_read_io_threads
Definition: srv0srv.cc:429
void srv_master_thread()
The master thread controlling the server.
Definition: srv0srv.cc:2810
mysql_pfs_key_t log_checkpointer_thread_key
Thread slot in the thread table.
Definition: srv0srv.h:1201
ulint innodb_dblwr_writes
srv_dblwr_writes
Definition: srv0srv.h:1147
ulint innodb_buffer_pool_bytes_data
File bytes used.
Definition: srv0srv.h:1130
ulong srv_log_write_max_size
When log writer follows links in the log recent written buffer, it stops when it has reached at least...
Definition: srv0srv.cc:271
ulint innodb_system_rows_updated
srv_n_system_rows_updated
Definition: srv0srv.h:1175
double srv_max_dirty_pages_pct_lwm
Definition: srv0srv.cc:464
uint srv_log_spin_cpu_abs_lwm
Minimum absolute value of cpu time for which spin-delay is used.
Definition: srv0srv.cc:256
ulong srv_log_flush_notifier_spin_delay
Number of spin iterations, for which log flush notifier thread is waiting for advanced flushed_to_dis...
Definition: srv0srv.cc:337
mysql_pfs_key_t fts_parallel_tokenization_thread_key
ulong srv_undo_tablespaces
Number of undo tablespaces to use.
Definition: srv0srv.cc:143
PSI_stage_info srv_stage_alter_table_log_table
Performance schema stage event for monitoring ALTER TABLE progress row_log_table_apply().
Definition: srv0srv.cc:785
@ SRV_FORCE_NO_LOG_REDO
do not do the log roll-forward in connection with recovery
Definition: srv0srv.h:916
bool srv_log_checksums
Whether to generate and require checksums on the redo log pages.
Definition: srv0srv.cc:347
bool srv_purge_view_update_only_debug
Definition: trx0purge.cc:82
Definition: que0que.h:251
ulint innodb_buffer_pool_pages_latched
Latched pages.
Definition: srv0srv.h:1136
type
Definition: base.h:36
ulong srv_log_flusher_spin_delay
Number of spin iterations, for which log flusher thread is waiting for new data to flush,...
Definition: srv0srv.cc:321
ulint innodb_pages_created
buf_pool->stat.n_pages_created
Definition: srv0srv.h:1156
bool srv_random_read_ahead
Definition: srv0srv.cc:433
unsigned long long srv_stats_persistent_sample_pages
Definition: srv0srv.cc:542
bool srv_file_per_table
store to its own file each table created by an user; data dictionary tables are in the system tablesp...
Definition: srv0srv.cc:188
ulint innodb_undo_tablespaces_implicit
number of undo tablespaces innoDB created implicitly.
Definition: srv0srv.h:1183
long long srv_buf_pool_curr_size
Current size in bytes.
Definition: srv0srv.cc:418
srv_thread_type
Types of threads existing in the system.
Definition: srv0srv.h:939
int64_t ib_time_monotonic_t
Time stamp read from the monotonic clock (returned by ut_time_monotonic()).
Definition: ut0ut.h:89
ulong srv_sort_buf_size
Sort buffer size in index creation.
Definition: srv0srv.cc:191
FILE * srv_misc_tmpfile
Temporary file for miscellanous diagnostic output.
Definition: srv0srv.cc:594
ulint_ctr_1_t data_read
Number of data read in total (in bytes)
Definition: srv0srv.h:120
FILE * srv_monitor_file
Temporary file for innodb monitor output.
Definition: srv0srv.cc:588
ulong srv_n_purge_threads
Definition: srv0srv.cc:474
PSI_stage_info srv_stage_alter_table_read_pk_internal_sort
Performance schema stage event for monitoring ALTER TABLE progress row_merge_read_clustered_index().
Definition: srv0srv.cc:796
ulong srv_buf_pool_dump_pct
Dump this % of each buffer pool during BP dump.
Definition: srv0srv.cc:420
ulong srv_log_wait_for_flush_spin_hwm
Maximum value of average log flush time for which spin-delay is used.
Definition: srv0srv.cc:264
IB_thread m_log_checkpointer
Redo checkpointer thread.
Definition: srv0srv.h:172
ulong srv_innodb_stats_method
Definition: srv0srv.cc:482
ulint innodb_data_writes
I/O write requests.
Definition: srv0srv.h:1120
ulint_ctr_64_t n_sampled_pages_skipped
Number of sampled pages skipped.
Definition: srv0srv.h:159
IB_thread m_log_archiver
Archiver's log archiver (used by Clone).
Definition: srv0srv.h:234
ulint srv_get_activity_count(void)
Get current server activity count.
Definition: srv0srv.cc:1930
bool srv_stats_persistent
Definition: srv0srv.cc:540
ulint_ctr_64_t n_rows_updated
Number of rows updated.
Definition: srv0srv.h:135
os_event_t event
Event used in suspending the thread when it has nothing to do.
Definition: srv0srv.h:1230
ulong srv_purge_batch_size
Definition: srv0srv.cc:477
@ SRV_NONE
None.
Definition: srv0srv.h:940
ulint innodb_rows_inserted
srv_n_rows_inserted
Definition: srv0srv.h:1170
int64_t innodb_row_lock_time
srv_n_lock_wait_time / 1000
Definition: srv0srv.h:1162
mysql_pfs_key_t srv_master_thread_key
ulint srv_release_threads(enum srv_thread_type type, ulint n)
Releases threads of the type given from suspension in the thread table.
Definition: srv0srv.cc:987
struct export_var_t export_vars
Status variables to be passed to MySQL.
Definition: srv0srv.cc:491
srv_stats_t srv_stats
Global counters.
Definition: srv0srv.cc:487
ulint srv_buf_pool_size
Requested size in bytes.
Definition: srv0srv.cc:384
lsn_ctr_1_t os_log_written
Amount of data written to the log files in bytes.
Definition: srv0srv.h:87
ulint innodb_log_writes
srv_log_writes
Definition: srv0srv.h:1150
@ SRV_UNIX_O_DIRECT_NO_FSYNC
do not use fsync() when using direct IO i.e.
Definition: srv0srv.h:865
bool srv_checkpoint_disabled
If true then disable checkpointing.
Definition: srv0srv.cc:351