MySQL  8.0.20
Source Code Documentation
srv0srv.h File Reference

The server main program. More...

#include "buf0checksum.h"
#include "fil0fil.h"
#include "log0types.h"
#include "mysql/psi/mysql_stage.h"
#include "univ.i"
#include "log0ddl.h"
#include "os0event.h"
#include "os0file.h"
#include "os0thread.h"
#include "que0types.h"
#include "srv0conc.h"
#include "trx0types.h"
#include "ut0counter.h"
#include <future>

Go to the source code of this file.

Classes

struct  srv_stats_t
 
struct  Srv_threads
 Structure which keeps shared future objects for InnoDB background threads. More...
 
struct  Srv_cpu_usage
 
struct  export_var_t
 Status variables to be passed to MySQL. More...
 
struct  srv_slot_t
 Thread slot in the thread table. More...
 

Macros

#define SRV_BUF_DUMP_FILENAME_DEFAULT   "ib_buffer_pool"
 The buffer pool dump/load file name. More...
 
#define SRV_AUTO_EXTEND_INCREMENT   (srv_sys_space.get_autoextend_increment())
 
#define SRV_N_LOG_FILES_CLONE_MAX   1000
 
#define SRV_N_LOG_FILES_MAX   100
 Maximum number of srv_n_log_files, or innodb_log_files_in_group. More...
 
#define SRV_MAX_IO_CAPACITY_DUMMY_DEFAULT   (~0UL)
 
#define SRV_MAX_IO_CAPACITY_LIMIT   (~0UL)
 
#define PCT_IO(p)   ((ulong)(srv_io_capacity * ((double)(p) / 100.0)))
 
#define MAX_PURGE_THREADS   32
 Maximum number of purge threads, including the purge coordinator. More...
 
#define SRV_SEMAPHORE_WAIT_EXTENSION   7200
 
#define SRV_MAX_N_IO_THREADS   130
 
#define srv_active_wake_master_thread()
 

Typedefs

typedef enum srv_stats_method_name_enum srv_stats_method_name_t
 

Enumerations

enum  srv_unix_flush_t {
  SRV_UNIX_FSYNC = 0, SRV_UNIX_O_DSYNC, SRV_UNIX_LITTLESYNC, SRV_UNIX_NOSYNC,
  SRV_UNIX_O_DIRECT, SRV_UNIX_O_DIRECT_NO_FSYNC
}
 Alternatives for the file flush option in Unix. More...
 
enum  {
  SRV_FORCE_IGNORE_CORRUPT = 1, SRV_FORCE_NO_BACKGROUND = 2, SRV_FORCE_NO_TRX_UNDO = 3, SRV_FORCE_NO_IBUF_MERGE = 4,
  SRV_FORCE_NO_UNDO_LOG_SCAN = 5, SRV_FORCE_NO_LOG_REDO = 6
}
 Alternatives for srv_force_recovery. More...
 
enum  srv_stats_method_name_enum { SRV_STATS_NULLS_EQUAL, SRV_STATS_NULLS_UNEQUAL, SRV_STATS_NULLS_IGNORED }
 
enum  srv_thread_type { SRV_NONE, SRV_WORKER, SRV_PURGE, SRV_MASTER }
 Types of threads existing in the system. More...
 

Functions

bool srv_thread_is_active (const IB_thread &thread)
 Check if given thread is still active. More...
 
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_CLEANUP, before it proceeds with further clean up. More...
 
bool srv_is_direct_io ()
 
void srv_boot (void)
 Boots Innobase server. More...
 
void srv_free (void)
 Frees the data structures created in srv_init(). More...
 
void srv_set_io_thread_op_info (ulint i, const char *str)
 Sets the info describing an i/o thread current state. More...
 
void srv_reset_io_thread_op_info ()
 Resets the info describing an i/o thread current state. More...
 
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 it is suspended (not sleeping). More...
 
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 if it is suspended (not sleeping). More...
 
void srv_wake_master_thread (void)
 Wakes up the master thread if it is suspended or being suspended. More...
 
ibool srv_printf_innodb_monitor (FILE *file, ibool nowait, ulint *trx_start, ulint *trx_end)
 Outputs to a file the output of the InnoDB Monitor. More...
 
void srv_export_innodb_status (void)
 Function to pass InnoDB status variables to MySQL. More...
 
ulint srv_get_activity_count (void)
 Get current server activity count. More...
 
ibool srv_check_activity (ulint old_activity_count)
 Check if there has been any activity. More...
 
void srv_inc_activity_count (void)
 Increment the server activity counter. More...
 
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. More...
 
void srv_monitor_thread ()
 A thread which prints the info output by various InnoDB monitors. More...
 
void srv_error_monitor_thread ()
 A thread which prints warnings about semaphore waits which have lasted too long. More...
 
void srv_master_thread ()
 The master thread controlling the server. More...
 
void srv_purge_coordinator_thread ()
 Purge coordinator thread that schedules the purge tasks. More...
 
void srv_worker_thread ()
 Worker thread that reads tasks from the work queue and executes them. More...
 
void undo_rotate_default_master_key ()
 Rotate default master key for UNDO tablespace. More...
 
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. More...
 
bool srv_enable_undo_encryption (bool is_boot)
 Enable UNDO tablespaces encryption. More...
 
bool srv_enable_redo_encryption (bool is_boot)
 Enable REDO log encryption. More...
 
ulint srv_get_task_queue_length (void)
 Get count of tasks in the queue. More...
 
ulint srv_release_threads (enum srv_thread_type type, ulint n)
 Releases threads of the type given from suspension in the thread table. More...
 
bool srv_master_thread_is_active ()
 Check whether the master thread is active. More...
 
void srv_purge_wakeup (void)
 Wakeup the purge threads. More...
 
bool srv_purge_threads_active ()
 Check if the purge threads are active, both coordinator and worker threads. More...
 
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. More...
 
void undo_spaces_init ()
 Initialize undo::spaces and trx_sys_undo_spaces, called once during srv_start(). More...
 
void undo_spaces_deinit ()
 Free the resources occupied by undo::spaces and trx_sys_undo_spaces, called once during thread de-initialization. More...
 
void srv_master_thread_disabled_debug_update (THD *thd, SYS_VAR *var, void *var_ptr, const void *save)
 Disables master thread. More...
 

Variables

Srv_threads srv_threads
 Structure with state of srv background threads. More...
 
Srv_cpu_usage srv_cpu_usage
 Structure with cpu usage information. More...
 
Log_DDLlog_ddl
 Object to handle Log_DDL. More...
 
bool srv_is_upgrade_mode
 
bool srv_downgrade_logs
 
bool srv_upgrade_old_undo_found
 
bool srv_downgrade_partition_files
 
const char * srv_main_thread_op_info
 
os_event_t srv_monitor_event
 Event to signal the monitor thread. More...
 
os_event_t srv_error_event
 Event to signal the error thread. More...
 
os_event_t srv_buf_dump_event
 The buffer pool dump/load thread waits on this event. More...
 
os_event_t srv_buf_resize_event
 The buffer pool resize thread waits on this event. More...
 
char * srv_buf_dump_filename
 The buffer pool dump/load file name. More...
 
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 startup. More...
 
bool srv_buffer_pool_load_at_startup
 
bool srv_disable_sort_file_cache
 
ib_mutex_t page_zip_stat_per_index_mutex
 Mutex protecting page_zip_stat_per_index. More...
 
ib_mutex_t srv_monitor_file_mutex
 
FILE * srv_monitor_file
 Temporary file for innodb monitor output. More...
 
ib_mutex_t srv_misc_tmpfile_mutex
 Mutex for locking srv_misc_tmpfile. More...
 
FILE * srv_misc_tmpfile
 Temporary file for miscellanous diagnostic output. More...
 
char * srv_data_home
 
ulong srv_dblwr_pages
 Number of pages per doublewrite thread/segment. More...
 
bool srv_read_only_mode
 Set if InnoDB must operate in read-only mode. More...
 
bool high_level_read_only
 Set if InnoDB operates in read-only mode or innodb-force-recovery is greater than SRV_FORCE_NO_TRX_UNDO. More...
 
bool srv_file_per_table
 store to its own file each table created by an user; data dictionary tables are in the system tablespace 0 More...
 
ulong srv_thread_sleep_delay
 Sleep delay for threads waiting to enter InnoDB. More...
 
ulong srv_adaptive_max_sleep_delay
 Maximum sleep delay (in micro-seconds), value of 0 disables it. More...
 
ulong srv_sort_buf_size
 Sort buffer size in index creation. More...
 
unsigned long long srv_online_max_size
 Maximum modification log file size for online index creation. More...
 
ulong srv_parallel_read_threads
 Number of threads to use for parallel reads. More...
 
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 it in), otherwise we will use simulated aio we build below with threads. More...
 
bool srv_numa_interleave
 
char * srv_innodb_directories
 The innodb_directories variable value. More...
 
char * srv_undo_dir
 Server undo tablespaces directory, can be absolute path. More...
 
ulong srv_undo_tablespaces
 Number of undo tablespaces to use. More...
 
ulong srv_rollback_segments
 The number of rollback segments per tablespace. More...
 
unsigned long long srv_max_undo_tablespace_size
 Maximum size of undo tablespace. More...
 
ulong srv_purge_rseg_truncate_frequency
 Rate at which UNDO records should be purged. More...
 
bool srv_undo_log_truncate
 Enable or Disable Truncate of UNDO tablespace. More...
 
bool srv_undo_log_encrypt
 Enable or disable Encrypt of UNDO tablespace. More...
 
const page_no_t SRV_UNDO_TABLESPACE_SIZE_IN_PAGES
 Default size of UNDO tablespace while it is created new. More...
 
char * srv_log_group_home_dir
 
bool srv_redo_log_encrypt
 Enable or Disable Encrypt of REDO tablespace. More...
 
ulong srv_n_log_files
 
ulonglong srv_log_file_size
 At startup, this is the current redo log file size. More...
 
ulonglong srv_log_file_size_requested
 The value of the startup parameter innodb_log_file_size. More...
 
ulong srv_log_buffer_size
 Space for log buffer, expressed in bytes. More...
 
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 that many bytes to write, limiting how many bytes can be written in single call. More...
 
ulong srv_log_write_ahead_size
 Size of block, used for writing ahead to avoid read-on-write. More...
 
ulong srv_log_write_events
 Number of events used for notifications about redo write. More...
 
ulong srv_log_flush_events
 Number of events used for notifications about redo flush. More...
 
ulong srv_log_recent_written_size
 Number of slots in a small buffer, which is used to allow concurrent writes to log buffer. More...
 
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, when they are added to flush lists. More...
 
uint srv_log_spin_cpu_abs_lwm
 Minimum absolute value of cpu time for which spin-delay is used. More...
 
uint srv_log_spin_cpu_pct_hwm
 Maximum percentage of cpu time for which spin-delay is used. More...
 
ulong srv_log_wait_for_write_spin_delay
 Number of spin iterations, when spinning and waiting for log buffer written up to given LSN, before we fallback to loop with sleeps. More...
 
ulong srv_log_wait_for_write_timeout
 Timeout used when waiting for redo write (microseconds). More...
 
ulong srv_log_wait_for_flush_spin_delay
 Number of spin iterations, when spinning and waiting for log flushed. More...
 
ulong srv_log_wait_for_flush_spin_hwm
 Maximum value of average log flush time for which spin-delay is used. More...
 
ulong srv_log_wait_for_flush_timeout
 Timeout used when waiting for redo flush (microseconds). More...
 
ulong srv_log_writer_spin_delay
 Number of spin iterations, for which log writer thread is waiting for new data to write or flush without sleeping. More...
 
ulong srv_log_writer_timeout
 Initial timeout used to wait on writer_event. More...
 
ulong srv_log_checkpoint_every
 Number of milliseconds every which a periodical checkpoint is written by the log checkpointer thread (unless periodical checkpoints are disabled, which is a case during initial phase of startup). More...
 
ulong srv_log_flusher_spin_delay
 Number of spin iterations, for which log flusher thread is waiting for new data to flush, without sleeping. More...
 
ulong srv_log_flusher_timeout
 Initial timeout used to wait on flusher_event. More...
 
ulong srv_log_write_notifier_spin_delay
 Number of spin iterations, for which log write notifier thread is waiting for advanced writeed_to_disk_lsn without sleeping. More...
 
ulong srv_log_write_notifier_timeout
 Initial timeout used to wait on write_notifier_event. More...
 
ulong srv_log_flush_notifier_spin_delay
 Number of spin iterations, for which log flush notifier thread is waiting for advanced flushed_to_disk_lsn without sleeping. More...
 
ulong srv_log_flush_notifier_timeout
 Initial timeout used to wait on flush_notifier_event. More...
 
ulong srv_log_closer_spin_delay
 Number of spin iterations, for which log closerr thread is waiting for a reachable untraversed link in recent_closed. More...
 
ulong srv_log_closer_timeout
 Initial sleep used in log closer after spin delay is finished. More...
 
bool srv_log_checksums
 Whether to generate and require checksums on the redo log pages. More...
 
bool srv_checkpoint_disabled
 If true then disable checkpointing. More...
 
bool srv_inject_too_many_concurrent_trxs
 
ulong srv_flush_log_at_trx_commit
 
uint srv_flush_log_at_timeout
 
bool srv_adaptive_flushing
 
bool srv_flush_sync
 
bool srv_load_corrupted
 
bool srv_dedicated_server
 Dedicated server setting. More...
 
ulint srv_buf_pool_size
 Requested size in bytes. More...
 
const ulint srv_buf_pool_min_size
 Minimum pool size in bytes. More...
 
const ulint srv_buf_pool_def_size
 Default pool size in bytes. More...
 
const longlong srv_buf_pool_max_size
 Maximum pool size in bytes. More...
 
ulonglong srv_buf_pool_chunk_unit
 Requested buffer pool chunk size. More...
 
const ulonglong srv_buf_pool_chunk_unit_min
 Minimum buffer pool chunk size. More...
 
const ulonglong srv_buf_pool_chunk_unit_blk_sz
 The buffer pool chunk size must be a multiple of this number. More...
 
const ulonglong srv_buf_pool_chunk_unit_max
 Maximum buffer pool chunk size. More...
 
ulong srv_buf_pool_instances
 Requested number of buffer pool instances. More...
 
const ulong srv_buf_pool_instances_default
 Default number of buffer pool instances. More...
 
ulong srv_n_page_hash_locks
 Number of locks to protect buf_pool->page_hash. More...
 
ulong srv_LRU_scan_depth
 Scan depth for LRU flush batch i.e. More...
 
ulong srv_flush_neighbors
 Whether or not to flush neighbors of a block. More...
 
ulint srv_buf_pool_old_size
 Previously requested size. More...
 
ulint srv_buf_pool_base_size
 Current size as scaling factor for the other components. More...
 
long long srv_buf_pool_curr_size
 Current size in bytes. More...
 
ulong srv_buf_pool_dump_pct
 Dump this % of each buffer pool during BP dump. More...
 
ulint srv_lock_table_size
 Lock table size in bytes. More...
 
ulint srv_n_file_io_threads
 Number of IO threads to use. More...
 
bool srv_random_read_ahead
 
ulong srv_read_ahead_threshold
 
ulong srv_n_read_io_threads
 
ulong srv_n_write_io_threads
 
uint srv_change_buffer_max_size
 Maximum on-disk size of change buffer in terms of percentage of the buffer pool. More...
 
const ulong srv_idle_flush_pct_default
 Default value of srv_idle_flush_pct. More...
 
ulong srv_idle_flush_pct
 How much flush to be done in case of server is idle. More...
 
ulong srv_io_capacity
 
ulong srv_max_io_capacity
 
ulong srv_innodb_stats_method
 
ulint srv_max_n_open_files
 
ulong srv_n_page_cleaners
 
double srv_max_dirty_pages_pct
 
double srv_max_dirty_pages_pct_lwm
 
ulong srv_adaptive_flushing_lwm
 
ulong srv_flushing_avg_loops
 
ulong srv_force_recovery
 Normally 0. More...
 
ulong srv_force_recovery_crash
 Inject a crash at different steps of the recovery process. More...
 
ulong srv_fast_shutdown
 The value of the configuration parameter innodb_fast_shutdown, controlling the InnoDB shutdown. More...
 
ibool srv_innodb_status
 
unsigned long long srv_stats_transient_sample_pages
 
bool srv_stats_persistent
 
unsigned long long srv_stats_persistent_sample_pages
 
bool srv_stats_auto_recalc
 
bool srv_stats_include_delete_marked
 
ulong srv_checksum_algorithm
 the macro MYSQL_SYSVAR_ENUM() requires "long unsigned int" and if we use srv_checksum_algorithm_t here then we get a compiler error: ha_innodb.cc:12251: error: cannot convert 'srv_checksum_algorithm_t*' to 'long unsigned int*' in initialization More...
 
double srv_max_buf_pool_modified_pct
 
ulong srv_max_purge_lag
 Maximum allowable purge history length. More...
 
ulong srv_max_purge_lag_delay
 Max DML user threads delay in micro-seconds. More...
 
ulong srv_replication_delay
 
bool srv_print_innodb_monitor
 
bool srv_print_innodb_lock_monitor
 
ulong srv_n_spin_wait_rounds
 
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 the ticket. More...
 
ulong srv_spin_wait_delay
 
ibool srv_priority_boost
 
ulint srv_truncated_status_writes
 
bool srv_ibuf_disable_background_merge
 
bool srv_buf_pool_debug
 This is used to enable multiple buffer pool instances with small buffer pool size. More...
 
bool srv_sync_debug
 
bool srv_purge_view_update_only_debug
 
bool srv_master_thread_disabled_debug
 Value of MySQL global used to disable master thread. More...
 
ulong srv_fatal_semaphore_wait_threshold
 
ulint srv_dml_needed_delay
 
const char * srv_io_thread_op_info []
 
const char * srv_io_thread_function []
 
ulong srv_n_purge_threads
 
ulong srv_purge_batch_size
 
ulong srv_sync_array_size
 User configured sync array size. More...
 
bool srv_print_all_deadlocks
 Print all user-level transactions deadlocks to mysqld stderr. More...
 
bool srv_print_ddl_logs
 Print all DDL logs to mysqld stderr. More...
 
bool srv_cmp_per_index_enabled
 Enable INFORMATION_SCHEMA.innodb_cmp_per_index. More...
 
struct export_var_t export_vars
 Status variables to be passed to MySQL. More...
 
srv_stats_t srv_stats
 Global counters. More...
 
mysql_pfs_key_t log_archiver_thread_key
 
mysql_pfs_key_t page_archiver_thread_key
 
mysql_pfs_key_t buf_dump_thread_key
 
mysql_pfs_key_t buf_resize_thread_key
 
mysql_pfs_key_t clone_ddl_thread_key
 
mysql_pfs_key_t clone_gtid_thread_key
 
mysql_pfs_key_t dict_stats_thread_key
 
mysql_pfs_key_t fts_optimize_thread_key
 
mysql_pfs_key_t fts_parallel_merge_thread_key
 
mysql_pfs_key_t fts_parallel_tokenization_thread_key
 
mysql_pfs_key_t io_handler_thread_key
 
mysql_pfs_key_t io_ibuf_thread_key
 
mysql_pfs_key_t io_log_thread_key
 
mysql_pfs_key_t io_read_thread_key
 
mysql_pfs_key_t io_write_thread_key
 
mysql_pfs_key_t log_writer_thread_key
 
mysql_pfs_key_t log_closer_thread_key
 
mysql_pfs_key_t log_checkpointer_thread_key
 
mysql_pfs_key_t log_flusher_thread_key
 
mysql_pfs_key_t log_write_notifier_thread_key
 
mysql_pfs_key_t log_flush_notifier_thread_key
 
mysql_pfs_key_t page_flush_coordinator_thread_key
 
mysql_pfs_key_t page_flush_thread_key
 
mysql_pfs_key_t recv_writer_thread_key
 
mysql_pfs_key_t srv_error_monitor_thread_key
 
mysql_pfs_key_t srv_lock_timeout_thread_key
 
mysql_pfs_key_t srv_master_thread_key
 
mysql_pfs_key_t srv_monitor_thread_key
 
mysql_pfs_key_t srv_purge_thread_key
 
mysql_pfs_key_t srv_worker_thread_key
 
mysql_pfs_key_t trx_recovery_rollback_thread_key
 
mysql_pfs_key_t srv_ts_alter_encrypt_thread_key
 
mysql_pfs_key_t parallel_read_thread_key
 
mysql_pfs_key_t parallel_read_ahead_thread_key
 
PSI_stage_info srv_stage_alter_table_end
 Performance schema stage event for monitoring ALTER TABLE progress everything after flush log_make_latest_checkpoint(). More...
 
PSI_stage_info srv_stage_alter_table_flush
 Performance schema stage event for monitoring ALTER TABLE progress log_make_latest_checkpoint(). More...
 
PSI_stage_info srv_stage_alter_table_insert
 Performance schema stage event for monitoring ALTER TABLE progress row_merge_insert_index_tuples(). More...
 
PSI_stage_info srv_stage_alter_table_log_index
 Performance schema stage event for monitoring ALTER TABLE progress row_log_apply(). More...
 
PSI_stage_info srv_stage_alter_table_log_table
 Performance schema stage event for monitoring ALTER TABLE progress row_log_table_apply(). More...
 
PSI_stage_info srv_stage_alter_table_merge_sort
 Performance schema stage event for monitoring ALTER TABLE progress row_merge_sort(). More...
 
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(). More...
 
PSI_stage_info srv_stage_alter_tablespace_encryption
 Performance schema stage event for monitoring ALTER TABLESPACE ENCRYPTION progress. More...
 
PSI_stage_info srv_stage_buffer_pool_load
 Performance schema stage event for monitoring buffer pool load progress. More...
 
PSI_stage_info srv_stage_clone_file_copy
 Performance schema stage event for monitoring clone file copy progress. More...
 
PSI_stage_info srv_stage_clone_redo_copy
 Performance schema stage event for monitoring clone redo copy progress. More...
 
PSI_stage_info srv_stage_clone_page_copy
 Performance schema stage event for monitoring clone page copy progress. More...
 
enum srv_unix_flush_t srv_unix_file_flush_method
 
ulong srv_debug_compress
 Force all user tables to use page compression. More...
 

Detailed Description

The server main program.

Created 10/10/1995 Heikki Tuuri

Macro Definition Documentation

◆ MAX_PURGE_THREADS

#define MAX_PURGE_THREADS   32

Maximum number of purge threads, including the purge coordinator.

◆ PCT_IO

#define PCT_IO (   p)    ((ulong)(srv_io_capacity * ((double)(p) / 100.0)))

◆ srv_active_wake_master_thread

#define srv_active_wake_master_thread ( )
Value:
do { \
srv_active_wake_master_thread_low(); \
} \
} while (0)
bool srv_read_only_mode
Set if InnoDB must operate in read-only mode.
Definition: srv0srv.cc:181

◆ SRV_AUTO_EXTEND_INCREMENT

#define SRV_AUTO_EXTEND_INCREMENT   (srv_sys_space.get_autoextend_increment())

◆ SRV_BUF_DUMP_FILENAME_DEFAULT

#define SRV_BUF_DUMP_FILENAME_DEFAULT   "ib_buffer_pool"

The buffer pool dump/load file name.

◆ SRV_MAX_IO_CAPACITY_DUMMY_DEFAULT

#define SRV_MAX_IO_CAPACITY_DUMMY_DEFAULT   (~0UL)

◆ SRV_MAX_IO_CAPACITY_LIMIT

#define SRV_MAX_IO_CAPACITY_LIMIT   (~0UL)

◆ SRV_MAX_N_IO_THREADS

#define SRV_MAX_N_IO_THREADS   130

◆ SRV_N_LOG_FILES_CLONE_MAX

#define SRV_N_LOG_FILES_CLONE_MAX   1000

◆ SRV_N_LOG_FILES_MAX

#define SRV_N_LOG_FILES_MAX   100

Maximum number of srv_n_log_files, or innodb_log_files_in_group.

◆ SRV_SEMAPHORE_WAIT_EXTENSION

#define SRV_SEMAPHORE_WAIT_EXTENSION   7200

Typedef Documentation

◆ srv_stats_method_name_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Alternatives for srv_force_recovery.

Non-zero values are intended to help the user get a damaged database up so that he can dump intact tables and rows with SELECT INTO OUTFILE. The database must not otherwise be used with these options! A bigger number below means that all precautions of lower numbers are included.

Enumerator
SRV_FORCE_IGNORE_CORRUPT 

let the server run even if it detects a corrupt page

SRV_FORCE_NO_BACKGROUND 

prevent the main thread from running: if a crash would occur in purge, this prevents it

SRV_FORCE_NO_TRX_UNDO 

do not run trx rollback after recovery

SRV_FORCE_NO_IBUF_MERGE 

prevent also ibuf operations: if they would cause a crash, better not do them

SRV_FORCE_NO_UNDO_LOG_SCAN 

do not look at undo logs when starting the database: InnoDB will treat even incomplete transactions as committed

SRV_FORCE_NO_LOG_REDO 

do not do the log roll-forward in connection with recovery

◆ srv_stats_method_name_enum

Enumerator
SRV_STATS_NULLS_EQUAL 
SRV_STATS_NULLS_UNEQUAL 
SRV_STATS_NULLS_IGNORED 

◆ srv_thread_type

Types of threads existing in the system.

Enumerator
SRV_NONE 

None.

SRV_WORKER 

threads serving parallelized queries and queries released from lock wait

SRV_PURGE 

Purge coordinator thread.

SRV_MASTER 

the master thread, (whose type number must be biggest)

◆ srv_unix_flush_t

Alternatives for the file flush option in Unix.

See also
innodb_flush_method_names
Enumerator
SRV_UNIX_FSYNC 

fsync, the default

SRV_UNIX_O_DSYNC 

open log files in O_SYNC mode

SRV_UNIX_LITTLESYNC 

do not call os_file_flush() when writing data files, but do flush after writing to log files

SRV_UNIX_NOSYNC 

do not flush after writing

SRV_UNIX_O_DIRECT 

invoke os_file_set_nocache() on data files.

This implies using non-buffered IO but still using fsync, the reason for which is that some FS do not flush meta-data when unbuffered IO happens

SRV_UNIX_O_DIRECT_NO_FSYNC 

do not use fsync() when using direct IO i.e.

: it can be set to avoid the fsync() call that we make when using SRV_UNIX_O_DIRECT. However, in this case user/DBA should be sure about the integrity of the meta-data

Function Documentation

◆ set_undo_tablespace_encryption()

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.

Parameters
[in]space_idundo tablespace id
[in]mtrmini-transaction
[in]is_boottrue if it is called during server start up.
Returns
false for success, true otherwise

◆ srv_active_wake_master_thread_low()

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 if it is suspended (not sleeping).

Used in the MySQL interface. Note that there is a small chance that the master thread stays suspended (we do not protect our operation with the kernel mutex, for performace reasons).

Tells the Innobase server that there has been activity in the database and wakes up the master thread if it is suspended (not sleeping).

Used in the MySQL interface. Note that there is a small chance that the master thread stays suspended (we do not protect our operation with the srv_sys_t->mutex, for performance reasons).

◆ srv_boot()

void srv_boot ( void  )

Boots Innobase server.

Boots Innobase server.

◆ srv_check_activity()

ibool srv_check_activity ( ulint  old_activity_count)

Check if there has been any activity.

Returns
false if no change in activity counter. old activity count
false if no change in activity counter.
Parameters
old_activity_countin: old activity count

◆ srv_enable_redo_encryption()

bool srv_enable_redo_encryption ( bool  is_boot)

Enable REDO log encryption.

Parameters
[in]is_boottrue if it is called during server start up. In this case, default master key will be used which will be rotated later with actual master key from kyering.
Returns
false for success, true otherwise.

◆ srv_enable_undo_encryption()

bool srv_enable_undo_encryption ( bool  is_boot)

Enable UNDO tablespaces encryption.

Parameters
[in]is_boottrue if it is called during server start up. In this case, default master key will be used which will be rotated later with actual master key from kyering.
Returns
false for success, true otherwise.

◆ srv_error_monitor_thread()

void srv_error_monitor_thread ( )

A thread which prints warnings about semaphore waits which have lasted too long.

These can be used to track bugs which cause hangs.

◆ srv_export_innodb_status()

void srv_export_innodb_status ( void  )

Function to pass InnoDB status variables to MySQL.

◆ srv_free()

void srv_free ( void  )

Frees the data structures created in srv_init().

◆ srv_get_activity_count()

ulint srv_get_activity_count ( void  )

Get current server activity count.

We don't hold srv_sys::mutex while reading this value as it is only used in heuristics.

Returns
activity count.

◆ srv_get_task_queue_length()

ulint srv_get_task_queue_length ( void  )

Get count of tasks in the queue.

Returns
number of tasks in queue

◆ srv_inc_activity_count()

void srv_inc_activity_count ( void  )

Increment the server activity counter.

Increment the server activity counter.

◆ srv_is_direct_io()

bool srv_is_direct_io ( )
inline

◆ srv_master_thread()

void srv_master_thread ( )

The master thread controlling the server.

◆ srv_master_thread_disabled_debug_update()

void srv_master_thread_disabled_debug_update ( THD thd,
SYS_VAR var,
void *  var_ptr,
const void *  save 
)

Disables master thread.

It's used by: SET GLOBAL innodb_master_thread_disabled_debug = 1 (0).

Parameters
[in]thdthread handle
[in]varpointer to system variable
[out]var_ptrwhere the formal string goes
[in]saveimmediate result from check function

◆ srv_master_thread_is_active()

bool srv_master_thread_is_active ( )

Check whether the master thread is active.

This is polled during the final phase of shutdown. The first phase of server shutdown must have already been executed (or the server must not have been fully started up).

See also
srv_pre_dd_shutdown()
Return values
trueif any thread is active
falseif no thread is active

◆ srv_monitor_thread()

void srv_monitor_thread ( )

A thread which prints the info output by various InnoDB monitors.

◆ srv_printf_innodb_monitor()

ibool srv_printf_innodb_monitor ( FILE *  file,
ibool  nowait,
ulint *  trx_start_pos,
ulint *  trx_end 
)

Outputs to a file the output of the InnoDB Monitor.

Returns
false if not all information printed due to failure to obtain necessary mutex out: file position of the end of the list of active transactions
false if not all information printed due to failure to obtain necessary mutex
Parameters
filein: output stream
nowaitin: whether to wait for the lock_sys_t:: mutex
trx_start_posout: file position of the start of the list of active transactions
trx_endout: file position of the end of the list of active transactions

◆ srv_purge_coordinator_thread()

void srv_purge_coordinator_thread ( )

Purge coordinator thread that schedules the purge tasks.

◆ srv_purge_threads_active()

bool srv_purge_threads_active ( )

Check if the purge threads are active, both coordinator and worker threads.

Returns
true if any thread is active, false if no thread is active

◆ srv_purge_wakeup()

void srv_purge_wakeup ( void  )

Wakeup the purge threads.

◆ srv_que_task_enqueue_low()

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.

in: query thread

Parameters
thrin: query thread

◆ srv_release_threads()

ulint srv_release_threads ( srv_thread_type  type,
ulint  n 
)

Releases threads of the type given from suspension in the thread table.

NOTE! The server mutex has to be reserved by the caller!

Returns
number of threads released: this may be less than n if not enough threads were suspended at the moment in: number of threads to release

NOTE! The server mutex has to be reserved by the caller!

Returns
number of threads released: this may be less than n if not enough threads were suspended at the moment.
Parameters
typein: thread type
nin: number of threads to release

◆ srv_reset_io_thread_op_info()

void srv_reset_io_thread_op_info ( )

Resets the info describing an i/o thread current state.

◆ srv_set_io_thread_op_info()

void srv_set_io_thread_op_info ( ulint  i,
const char *  str 
)

Sets the info describing an i/o thread current state.

in: constant char string describing the state

Parameters
iin: the 'segment' of the i/o thread
strin: constant char string describing the state

◆ srv_thread_delay_cleanup_if_needed()

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_CLEANUP, before it proceeds with further clean up.

This is used in the tests to see if such a possible delay does not have impact on the clean shutdown.

Parameters
[in]wait_for_signalwait until shutdown phase starts

◆ srv_thread_is_active()

bool srv_thread_is_active ( const IB_thread thread)

Check if given thread is still active.

◆ srv_undo_tablespace_create()

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.

Parameters
[in]space_nametablespace name
[in]file_namefile name
[out]space_idTablespace ID chosen
Returns
DB_SUCCESS or error code

Create an undo tablespace with an explicit file name.

Parameters
[in]space_nametablespace name
[in]file_namefile name
[in]space_idTablespace ID
Returns
DB_SUCCESS or error code

◆ srv_wake_master_thread()

void srv_wake_master_thread ( void  )

Wakes up the master thread if it is suspended or being suspended.

◆ srv_wake_purge_thread_if_not_active()

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 it is suspended (not sleeping).

Note that there is a small chance that the purge thread stays suspended (we do not protect our operation with the srv_sys_t:mutex, for performance reasons).

Note that there is a small chance that the purge thread stays suspended (we do not protect our check with the srv_sys_t:mutex and the purge_sys->latch, for performance reasons).

◆ srv_worker_thread()

void srv_worker_thread ( )

Worker thread that reads tasks from the work queue and executes them.

◆ undo_rotate_default_master_key()

void undo_rotate_default_master_key ( )

Rotate default master key for UNDO tablespace.

◆ undo_spaces_deinit()

void undo_spaces_deinit ( )

Free the resources occupied by undo::spaces and trx_sys_undo_spaces, called once during thread de-initialization.

◆ undo_spaces_init()

void undo_spaces_init ( )

Initialize undo::spaces and trx_sys_undo_spaces, called once during srv_start().

Variable Documentation

◆ buf_dump_thread_key

mysql_pfs_key_t buf_dump_thread_key

◆ buf_resize_thread_key

mysql_pfs_key_t buf_resize_thread_key

◆ clone_ddl_thread_key

mysql_pfs_key_t clone_ddl_thread_key

◆ clone_gtid_thread_key

mysql_pfs_key_t clone_gtid_thread_key

◆ dict_stats_thread_key

mysql_pfs_key_t dict_stats_thread_key

◆ export_vars

struct export_var_t export_vars

Status variables to be passed to MySQL.

◆ fts_optimize_thread_key

mysql_pfs_key_t fts_optimize_thread_key

◆ fts_parallel_merge_thread_key

mysql_pfs_key_t fts_parallel_merge_thread_key

◆ fts_parallel_tokenization_thread_key

mysql_pfs_key_t fts_parallel_tokenization_thread_key

◆ high_level_read_only

bool high_level_read_only

Set if InnoDB operates in read-only mode or innodb-force-recovery is greater than SRV_FORCE_NO_TRX_UNDO.

◆ io_handler_thread_key

mysql_pfs_key_t io_handler_thread_key

◆ io_ibuf_thread_key

mysql_pfs_key_t io_ibuf_thread_key

◆ io_log_thread_key

mysql_pfs_key_t io_log_thread_key

◆ io_read_thread_key

mysql_pfs_key_t io_read_thread_key

◆ io_write_thread_key

mysql_pfs_key_t io_write_thread_key

◆ log_archiver_thread_key

mysql_pfs_key_t log_archiver_thread_key

◆ log_checkpointer_thread_key

mysql_pfs_key_t log_checkpointer_thread_key

◆ log_closer_thread_key

mysql_pfs_key_t log_closer_thread_key

◆ log_ddl

Log_DDL* log_ddl

Object to handle Log_DDL.

◆ log_flush_notifier_thread_key

mysql_pfs_key_t log_flush_notifier_thread_key

◆ log_flusher_thread_key

mysql_pfs_key_t log_flusher_thread_key

◆ log_write_notifier_thread_key

mysql_pfs_key_t log_write_notifier_thread_key

◆ log_writer_thread_key

mysql_pfs_key_t log_writer_thread_key

◆ page_archiver_thread_key

mysql_pfs_key_t page_archiver_thread_key

◆ page_flush_coordinator_thread_key

mysql_pfs_key_t page_flush_coordinator_thread_key

◆ page_flush_thread_key

mysql_pfs_key_t page_flush_thread_key

◆ page_zip_stat_per_index_mutex

ib_mutex_t page_zip_stat_per_index_mutex

Mutex protecting page_zip_stat_per_index.

◆ parallel_read_ahead_thread_key

mysql_pfs_key_t parallel_read_ahead_thread_key

◆ parallel_read_thread_key

mysql_pfs_key_t parallel_read_thread_key

◆ recv_writer_thread_key

mysql_pfs_key_t recv_writer_thread_key

◆ srv_adaptive_flushing

bool srv_adaptive_flushing

◆ srv_adaptive_flushing_lwm

ulong srv_adaptive_flushing_lwm

◆ srv_adaptive_max_sleep_delay

ulong srv_adaptive_max_sleep_delay

Maximum sleep delay (in micro-seconds), value of 0 disables it.

◆ srv_buf_dump_event

os_event_t srv_buf_dump_event

The buffer pool dump/load thread waits on this event.

The buffer pool dump/load thread waits on this event.

◆ srv_buf_dump_filename

char* srv_buf_dump_filename

The buffer pool dump/load file name.

◆ srv_buf_pool_base_size

ulint srv_buf_pool_base_size

Current size as scaling factor for the other components.

◆ srv_buf_pool_chunk_unit

ulonglong srv_buf_pool_chunk_unit

Requested buffer pool chunk size.

Each buffer pool instance consists of one or more chunks.

◆ srv_buf_pool_chunk_unit_blk_sz

const ulonglong srv_buf_pool_chunk_unit_blk_sz

The buffer pool chunk size must be a multiple of this number.

◆ srv_buf_pool_chunk_unit_max

const ulonglong srv_buf_pool_chunk_unit_max

Maximum buffer pool chunk size.

◆ srv_buf_pool_chunk_unit_min

const ulonglong srv_buf_pool_chunk_unit_min

Minimum buffer pool chunk size.

◆ srv_buf_pool_curr_size

long long srv_buf_pool_curr_size

Current size in bytes.

◆ srv_buf_pool_debug

bool srv_buf_pool_debug

This is used to enable multiple buffer pool instances with small buffer pool size.

◆ srv_buf_pool_def_size

const ulint srv_buf_pool_def_size

Default pool size in bytes.

◆ srv_buf_pool_dump_pct

ulong srv_buf_pool_dump_pct

Dump this % of each buffer pool during BP dump.

◆ srv_buf_pool_instances

ulong srv_buf_pool_instances

Requested number of buffer pool instances.

◆ srv_buf_pool_instances_default

const ulong srv_buf_pool_instances_default

Default number of buffer pool instances.

◆ srv_buf_pool_max_size

const longlong srv_buf_pool_max_size

Maximum pool size in bytes.

◆ srv_buf_pool_min_size

const ulint srv_buf_pool_min_size

Minimum pool size in bytes.

◆ srv_buf_pool_old_size

ulint srv_buf_pool_old_size

Previously requested size.

Accesses protected by memory barriers.

◆ srv_buf_pool_size

ulint srv_buf_pool_size

Requested size in bytes.

◆ srv_buf_resize_event

os_event_t srv_buf_resize_event

The buffer pool resize thread waits on this event.

The buffer pool resize thread waits on this event.

◆ srv_buffer_pool_dump_at_shutdown

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 startup.

◆ srv_buffer_pool_load_at_startup

bool srv_buffer_pool_load_at_startup

◆ srv_change_buffer_max_size

uint srv_change_buffer_max_size

Maximum on-disk size of change buffer in terms of percentage of the buffer pool.

◆ srv_checkpoint_disabled

bool srv_checkpoint_disabled

If true then disable checkpointing.

◆ srv_checksum_algorithm

ulong srv_checksum_algorithm

the macro MYSQL_SYSVAR_ENUM() requires "long unsigned int" and if we use srv_checksum_algorithm_t here then we get a compiler error: ha_innodb.cc:12251: error: cannot convert 'srv_checksum_algorithm_t*' to 'long unsigned int*' in initialization

◆ srv_cmp_per_index_enabled

bool srv_cmp_per_index_enabled

Enable INFORMATION_SCHEMA.innodb_cmp_per_index.

◆ srv_cpu_usage

Srv_cpu_usage srv_cpu_usage

Structure with cpu usage information.

◆ srv_data_home

char* srv_data_home

◆ srv_dblwr_pages

ulong srv_dblwr_pages

Number of pages per doublewrite thread/segment.

◆ srv_debug_compress

ulong srv_debug_compress

Force all user tables to use page compression.

◆ srv_dedicated_server

bool srv_dedicated_server

Dedicated server setting.

◆ srv_disable_sort_file_cache

bool srv_disable_sort_file_cache

◆ srv_dml_needed_delay

ulint srv_dml_needed_delay

◆ srv_downgrade_logs

bool srv_downgrade_logs

◆ srv_downgrade_partition_files

bool srv_downgrade_partition_files

◆ srv_error_event

os_event_t srv_error_event

Event to signal the error thread.

◆ srv_error_monitor_thread_key

mysql_pfs_key_t srv_error_monitor_thread_key

◆ srv_fast_shutdown

ulong srv_fast_shutdown

The value of the configuration parameter innodb_fast_shutdown, controlling the InnoDB shutdown.

If innodb_fast_shutdown=0, InnoDB shutdown will purge all undo log records (except XA PREPARE transactions) and complete the merge of the entire change buffer, and then shut down the redo log.

If innodb_fast_shutdown=1, InnoDB shutdown will only flush the buffer pool to data files, cleanly shutting down the redo log.

If innodb_fast_shutdown=2, shutdown will effectively 'crash' InnoDB (but lose no committed transactions).

◆ srv_fatal_semaphore_wait_threshold

ulong srv_fatal_semaphore_wait_threshold

◆ srv_file_per_table

bool srv_file_per_table

store to its own file each table created by an user; data dictionary tables are in the system tablespace 0

◆ srv_flush_log_at_timeout

uint srv_flush_log_at_timeout

◆ srv_flush_log_at_trx_commit

ulong srv_flush_log_at_trx_commit

◆ srv_flush_neighbors

ulong srv_flush_neighbors

Whether or not to flush neighbors of a block.

◆ srv_flush_sync

bool srv_flush_sync

◆ srv_flushing_avg_loops

ulong srv_flushing_avg_loops

◆ srv_force_recovery

ulong srv_force_recovery

Normally 0.

When nonzero, skip some phases of crash recovery, starting from SRV_FORCE_IGNORE_CORRUPT, so that data can be recovered by SELECT or mysqldump. When this is nonzero, we do not allow any user modifications to the data.

◆ srv_force_recovery_crash

ulong srv_force_recovery_crash

Inject a crash at different steps of the recovery process.

This is for testing and debugging only.

◆ srv_ibuf_disable_background_merge

bool srv_ibuf_disable_background_merge

◆ srv_idle_flush_pct

ulong srv_idle_flush_pct

How much flush to be done in case of server is idle.

◆ srv_idle_flush_pct_default

const ulong srv_idle_flush_pct_default

Default value of srv_idle_flush_pct.

◆ srv_inject_too_many_concurrent_trxs

bool srv_inject_too_many_concurrent_trxs

◆ srv_innodb_directories

char* srv_innodb_directories

The innodb_directories variable value.

This a list of directories deliminated by ';', i.e the FIL_PATH_SEPARATOR.

◆ srv_innodb_stats_method

ulong srv_innodb_stats_method

◆ srv_innodb_status

ibool srv_innodb_status

◆ srv_io_capacity

ulong srv_io_capacity

◆ srv_io_thread_function

const char* srv_io_thread_function[]

◆ srv_io_thread_op_info

const char* srv_io_thread_op_info[]

◆ srv_is_upgrade_mode

bool srv_is_upgrade_mode

◆ srv_load_corrupted

bool srv_load_corrupted

◆ srv_lock_table_size

ulint srv_lock_table_size

Lock table size in bytes.

◆ srv_lock_timeout_thread_key

mysql_pfs_key_t srv_lock_timeout_thread_key

◆ srv_log_buffer_size

ulong srv_log_buffer_size

Space for log buffer, expressed in bytes.

Note, that log buffer will use only the largest power of two, which is not greater than the assigned space.

◆ srv_log_checkpoint_every

ulong srv_log_checkpoint_every

Number of milliseconds every which a periodical checkpoint is written by the log checkpointer thread (unless periodical checkpoints are disabled, which is a case during initial phase of startup).

◆ srv_log_checksums

bool srv_log_checksums

Whether to generate and require checksums on the redo log pages.

◆ srv_log_closer_spin_delay

ulong srv_log_closer_spin_delay

Number of spin iterations, for which log closerr thread is waiting for a reachable untraversed link in recent_closed.

◆ srv_log_closer_timeout

ulong srv_log_closer_timeout

Initial sleep used in log closer after spin delay is finished.

◆ srv_log_file_size

ulonglong srv_log_file_size

At startup, this is the current redo log file size.

During startup, if this is different from srv_log_file_size_requested (innodb_log_file_size), the redo log will be rebuilt and this size will be initialized to srv_log_file_size_requested. When upgrading from a previous redo log format, this will be set to 0, and writing to the redo log is not allowed.

During startup, this is in bytes, and later converted to pages.

During startup, if this is different from srv_log_file_size_requested (innodb_log_file_size), the redo log will be rebuilt and this size will be initialized to srv_log_file_size_requested. When upgrading from a previous redo log format, this will be set to 0, and writing to the redo log is not allowed. Expressed in bytes.

◆ srv_log_file_size_requested

ulonglong srv_log_file_size_requested

The value of the startup parameter innodb_log_file_size.

◆ srv_log_flush_events

ulong srv_log_flush_events

Number of events used for notifications about redo flush.

◆ srv_log_flush_notifier_spin_delay

ulong srv_log_flush_notifier_spin_delay

Number of spin iterations, for which log flush notifier thread is waiting for advanced flushed_to_disk_lsn without sleeping.

◆ srv_log_flush_notifier_timeout

ulong srv_log_flush_notifier_timeout

Initial timeout used to wait on flush_notifier_event.

◆ srv_log_flusher_spin_delay

ulong srv_log_flusher_spin_delay

Number of spin iterations, for which log flusher thread is waiting for new data to flush, without sleeping.

◆ srv_log_flusher_timeout

ulong srv_log_flusher_timeout

Initial timeout used to wait on flusher_event.

◆ srv_log_group_home_dir

char* srv_log_group_home_dir

◆ srv_log_recent_closed_size

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, when they are added to flush lists.

The slots are addressed by LSN values modulo number of the slots.

◆ srv_log_recent_written_size

ulong srv_log_recent_written_size

Number of slots in a small buffer, which is used to allow concurrent writes to log buffer.

The slots are addressed by LSN values modulo number of the slots.

◆ srv_log_spin_cpu_abs_lwm

uint srv_log_spin_cpu_abs_lwm

Minimum absolute value of cpu time for which spin-delay is used.

◆ srv_log_spin_cpu_pct_hwm

uint srv_log_spin_cpu_pct_hwm

Maximum percentage of cpu time for which spin-delay is used.

◆ srv_log_wait_for_flush_spin_delay

ulong srv_log_wait_for_flush_spin_delay

Number of spin iterations, when spinning and waiting for log flushed.

◆ srv_log_wait_for_flush_spin_hwm

ulong srv_log_wait_for_flush_spin_hwm

Maximum value of average log flush time for which spin-delay is used.

When flushing takes longer, user threads no longer spin when waiting for flushed redo. Expressed in microseconds.

◆ srv_log_wait_for_flush_timeout

ulong srv_log_wait_for_flush_timeout

Timeout used when waiting for redo flush (microseconds).

◆ srv_log_wait_for_write_spin_delay

ulong srv_log_wait_for_write_spin_delay

Number of spin iterations, when spinning and waiting for log buffer written up to given LSN, before we fallback to loop with sleeps.

This is not used when user thread has to wait for log flushed to disk.

◆ srv_log_wait_for_write_timeout

ulong srv_log_wait_for_write_timeout

Timeout used when waiting for redo write (microseconds).

◆ srv_log_write_ahead_size

ulong srv_log_write_ahead_size

Size of block, used for writing ahead to avoid read-on-write.

◆ srv_log_write_events

ulong srv_log_write_events

Number of events used for notifications about redo write.

◆ srv_log_write_max_size

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 that many bytes to write, limiting how many bytes can be written in single call.

◆ srv_log_write_notifier_spin_delay

ulong srv_log_write_notifier_spin_delay

Number of spin iterations, for which log write notifier thread is waiting for advanced writeed_to_disk_lsn without sleeping.

Number of spin iterations, for which log write notifier thread is waiting for advanced writeed_to_disk_lsn without sleeping.

◆ srv_log_write_notifier_timeout

ulong srv_log_write_notifier_timeout

Initial timeout used to wait on write_notifier_event.

◆ srv_log_writer_spin_delay

ulong srv_log_writer_spin_delay

Number of spin iterations, for which log writer thread is waiting for new data to write or flush without sleeping.

◆ srv_log_writer_timeout

ulong srv_log_writer_timeout

Initial timeout used to wait on writer_event.

◆ srv_LRU_scan_depth

ulong srv_LRU_scan_depth

Scan depth for LRU flush batch i.e.

: number of blocks scanned

◆ srv_main_thread_op_info

const char* srv_main_thread_op_info

◆ srv_master_thread_disabled_debug

bool srv_master_thread_disabled_debug

Value of MySQL global used to disable master thread.

Value of MySQL global used to disable master thread.

◆ srv_master_thread_key

mysql_pfs_key_t srv_master_thread_key

◆ srv_max_buf_pool_modified_pct

double srv_max_buf_pool_modified_pct

◆ srv_max_dirty_pages_pct

double srv_max_dirty_pages_pct

◆ srv_max_dirty_pages_pct_lwm

double srv_max_dirty_pages_pct_lwm

◆ srv_max_io_capacity

ulong srv_max_io_capacity

◆ srv_max_n_open_files

ulint srv_max_n_open_files

◆ srv_max_purge_lag

ulong srv_max_purge_lag

Maximum allowable purge history length.

<=0 means 'infinite'.

◆ srv_max_purge_lag_delay

ulong srv_max_purge_lag_delay

Max DML user threads delay in micro-seconds.

◆ srv_max_undo_tablespace_size

unsigned long long srv_max_undo_tablespace_size

Maximum size of undo tablespace.

◆ srv_misc_tmpfile

FILE* srv_misc_tmpfile

Temporary file for miscellanous diagnostic output.

◆ srv_misc_tmpfile_mutex

ib_mutex_t srv_misc_tmpfile_mutex

Mutex for locking srv_misc_tmpfile.

Not created if srv_read_only_mode. This mutex has a very low rank; threads reserving it should not acquire any further latches or sleep before releasing this one.

◆ srv_monitor_event

os_event_t srv_monitor_event

Event to signal the monitor thread.

◆ srv_monitor_file

FILE* srv_monitor_file

Temporary file for innodb monitor output.

◆ srv_monitor_file_mutex

ib_mutex_t srv_monitor_file_mutex

◆ srv_monitor_thread_key

mysql_pfs_key_t srv_monitor_thread_key

◆ srv_n_file_io_threads

ulint srv_n_file_io_threads

Number of IO threads to use.

◆ srv_n_free_tickets_to_enter

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 the ticket.

◆ srv_n_log_files

ulong srv_n_log_files

◆ srv_n_page_cleaners

ulong srv_n_page_cleaners

◆ srv_n_page_hash_locks

ulong srv_n_page_hash_locks

Number of locks to protect buf_pool->page_hash.

◆ srv_n_purge_threads

ulong srv_n_purge_threads

◆ srv_n_read_io_threads

ulong srv_n_read_io_threads

◆ srv_n_spin_wait_rounds

ulong srv_n_spin_wait_rounds

◆ srv_n_write_io_threads

ulong srv_n_write_io_threads

◆ srv_numa_interleave

bool srv_numa_interleave

◆ srv_online_max_size

unsigned long long srv_online_max_size

Maximum modification log file size for online index creation.

◆ srv_parallel_read_threads

ulong srv_parallel_read_threads

Number of threads to use for parallel reads.

◆ srv_print_all_deadlocks

bool srv_print_all_deadlocks

Print all user-level transactions deadlocks to mysqld stderr.

◆ srv_print_ddl_logs

bool srv_print_ddl_logs

Print all DDL logs to mysqld stderr.

◆ srv_print_innodb_lock_monitor

bool srv_print_innodb_lock_monitor

◆ srv_print_innodb_monitor

bool srv_print_innodb_monitor

◆ srv_priority_boost

ibool srv_priority_boost

◆ srv_purge_batch_size

ulong srv_purge_batch_size

◆ srv_purge_rseg_truncate_frequency

ulong srv_purge_rseg_truncate_frequency

Rate at which UNDO records should be purged.

◆ srv_purge_thread_key

mysql_pfs_key_t srv_purge_thread_key

◆ srv_purge_view_update_only_debug

bool srv_purge_view_update_only_debug

◆ srv_random_read_ahead

bool srv_random_read_ahead

◆ srv_read_ahead_threshold

ulong srv_read_ahead_threshold

◆ srv_read_only_mode

bool srv_read_only_mode

Set if InnoDB must operate in read-only mode.

We don't do any recovery and open all tables in RO mode instead of RW mode. We don't sync the max trx id to disk either.

◆ srv_redo_log_encrypt

bool srv_redo_log_encrypt

Enable or Disable Encrypt of REDO tablespace.

Enable or Disable Encrypt of REDO tablespace.

◆ srv_replication_delay

ulong srv_replication_delay

◆ srv_rollback_segments

ulong srv_rollback_segments

The number of rollback segments per tablespace.

◆ srv_sort_buf_size

ulong srv_sort_buf_size

Sort buffer size in index creation.

◆ srv_spin_wait_delay

ulong srv_spin_wait_delay

◆ srv_stage_alter_table_end

PSI_stage_info srv_stage_alter_table_end

Performance schema stage event for monitoring ALTER TABLE progress everything after flush log_make_latest_checkpoint().

◆ srv_stage_alter_table_flush

PSI_stage_info srv_stage_alter_table_flush

Performance schema stage event for monitoring ALTER TABLE progress log_make_latest_checkpoint().

◆ srv_stage_alter_table_insert

PSI_stage_info srv_stage_alter_table_insert

Performance schema stage event for monitoring ALTER TABLE progress row_merge_insert_index_tuples().

◆ srv_stage_alter_table_log_index

PSI_stage_info srv_stage_alter_table_log_index

Performance schema stage event for monitoring ALTER TABLE progress row_log_apply().

◆ srv_stage_alter_table_log_table

PSI_stage_info srv_stage_alter_table_log_table

Performance schema stage event for monitoring ALTER TABLE progress row_log_table_apply().

◆ srv_stage_alter_table_merge_sort

PSI_stage_info srv_stage_alter_table_merge_sort

Performance schema stage event for monitoring ALTER TABLE progress row_merge_sort().

◆ srv_stage_alter_table_read_pk_internal_sort

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().

◆ srv_stage_alter_tablespace_encryption

PSI_stage_info srv_stage_alter_tablespace_encryption

Performance schema stage event for monitoring ALTER TABLESPACE ENCRYPTION progress.

◆ srv_stage_buffer_pool_load

PSI_stage_info srv_stage_buffer_pool_load

Performance schema stage event for monitoring buffer pool load progress.

◆ srv_stage_clone_file_copy

PSI_stage_info srv_stage_clone_file_copy

Performance schema stage event for monitoring clone file copy progress.

◆ srv_stage_clone_page_copy

PSI_stage_info srv_stage_clone_page_copy

Performance schema stage event for monitoring clone page copy progress.

◆ srv_stage_clone_redo_copy

PSI_stage_info srv_stage_clone_redo_copy

Performance schema stage event for monitoring clone redo copy progress.

◆ srv_stats

srv_stats_t srv_stats

Global counters.

◆ srv_stats_auto_recalc

bool srv_stats_auto_recalc

◆ srv_stats_include_delete_marked

bool srv_stats_include_delete_marked

◆ srv_stats_persistent

bool srv_stats_persistent

◆ srv_stats_persistent_sample_pages

unsigned long long srv_stats_persistent_sample_pages

◆ srv_stats_transient_sample_pages

unsigned long long srv_stats_transient_sample_pages

◆ srv_sync_array_size

ulong srv_sync_array_size

User configured sync array size.

◆ srv_sync_debug

bool srv_sync_debug

◆ srv_thread_sleep_delay

ulong srv_thread_sleep_delay

Sleep delay for threads waiting to enter InnoDB.

In micro-seconds.

◆ srv_threads

Srv_threads srv_threads

Structure with state of srv background threads.

◆ srv_truncated_status_writes

ulint srv_truncated_status_writes

◆ srv_ts_alter_encrypt_thread_key

mysql_pfs_key_t srv_ts_alter_encrypt_thread_key

◆ srv_undo_dir

char* srv_undo_dir

Server undo tablespaces directory, can be absolute path.

Server undo tablespaces directory, can be absolute path.

This can be multiple paths separated by ';' and can also be absolute paths.

◆ srv_undo_log_encrypt

bool srv_undo_log_encrypt

Enable or disable Encrypt of UNDO tablespace.

◆ srv_undo_log_truncate

bool srv_undo_log_truncate

Enable or Disable Truncate of UNDO tablespace.

Note: If enabled then UNDO tablespace will be selected for truncate. While Server waits for undo-tablespace to truncate if user disables it, truncate action is completed but no new tablespace is marked for truncate (action is never aborted).

◆ SRV_UNDO_TABLESPACE_SIZE_IN_PAGES

const page_no_t SRV_UNDO_TABLESPACE_SIZE_IN_PAGES

Default size of UNDO tablespace while it is created new.

Default size of UNDO tablespace while it is created new.

◆ srv_undo_tablespaces

ulong srv_undo_tablespaces

Number of undo tablespaces to use.

Number of undo tablespaces to use.

◆ srv_unix_file_flush_method

enum srv_unix_flush_t srv_unix_file_flush_method

◆ srv_upgrade_old_undo_found

bool srv_upgrade_old_undo_found

◆ srv_use_native_aio

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 it in), otherwise we will use simulated aio we build below with threads.

◆ srv_worker_thread_key

mysql_pfs_key_t srv_worker_thread_key

◆ trx_recovery_rollback_thread_key

mysql_pfs_key_t trx_recovery_rollback_thread_key