drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
srv0srv.h File Reference
#include "univ.i"
#include "sync0sync.h"
#include "os0sync.h"
#include "que0types.h"
#include "trx0types.h"
#include <string>
Include dependency graph for srv0srv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  export_var_struct
struct  srv_sys_struct

Macros

#define srv0srv_h
#define SRV_AUTO_EXTEND_INCREMENT    (srv_auto_extend_increment * ((1024 * 1024) / UNIV_PAGE_SIZE))
#define PCT_IO(p)
#define srv_print_thread_releases   FALSE
#define srv_print_lock_waits   FALSE
#define srv_print_buf_io   FALSE
#define srv_print_log_io   FALSE
#define srv_print_latch_waits   FALSE
#define kernel_mutex   (*kernel_mutex_temp)
#define commit_id_mutex   (*commit_id_mutex_temp)
#define SRV_MAX_N_IO_THREADS   130

Typedefs

typedef struct export_var_struct export_struc
typedef struct srv_sys_struct srv_sys_t
typedef enum srv_stats_method_name_enum srv_stats_method_name_t
typedef struct srv_slot_struct srv_slot_t
typedef srv_slot_t srv_table_t

Enumerations

enum  { SRV_NOT_RAW = 0 , SRV_NEW_RAW , SRV_OLD_RAW }
enum  {
  SRV_UNIX_FSYNC = 1 , SRV_UNIX_O_DSYNC , SRV_UNIX_LITTLESYNC , SRV_UNIX_NOSYNC ,
  SRV_UNIX_O_DIRECT , SRV_UNIX_ALL_O_DIRECT
}
enum  { SRV_WIN_IO_NORMAL = 1 , SRV_WIN_IO_UNBUFFERED }
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
}
enum  srv_stats_method_name_enum { SRV_STATS_NULLS_EQUAL , SRV_STATS_NULLS_UNEQUAL , SRV_STATS_NULLS_IGNORED }
enum  srv_thread_type { SRV_WORKER = 0 , SRV_MASTER }

Functions

static const std::string srv_mysql50_table_name_prefix ("#mysql50#")
UNIV_INTERN ulint srv_boot (void)
UNIV_INTERN void srv_init (void)
UNIV_INTERN void srv_free (void)
UNIV_INTERN void srv_general_init (void)
UNIV_INTERN ulint srv_get_n_threads (void)
UNIV_INTERN ulint srv_thread_has_reserved_slot (enum srv_thread_type type)
UNIV_INTERN void srv_set_io_thread_op_info (ulint i, const char *str)
UNIV_INTERN ulint srv_release_threads (enum srv_thread_type type, ulint n)
UNIV_INTERN os_thread_ret_t srv_master_thread (void *arg)
UNIV_INTERN void srv_wake_purge_thread (void)
UNIV_INTERN void srv_active_wake_master_thread (void)
UNIV_INTERN void srv_wake_master_thread (void)
UNIV_INTERN void srv_wake_purge_thread_if_not_active (void)
UNIV_INTERN void srv_conc_enter_innodb (trx_t *trx)
UNIV_INTERN void srv_conc_force_enter_innodb (trx_t *trx)
UNIV_INTERN void srv_conc_force_exit_innodb (trx_t *trx)
UNIV_INTERN void srv_conc_exit_innodb (trx_t *trx)
UNIV_INTERN void srv_suspend_mysql_thread (que_thr_t *thr)
UNIV_INTERN void srv_release_mysql_thread_if_suspended (que_thr_t *thr)
UNIV_INTERN os_thread_ret_t srv_lock_timeout_thread (void *arg)
UNIV_INTERN os_thread_ret_t srv_monitor_thread (void *arg)
UNIV_INTERN os_thread_ret_t srv_error_monitor_thread (void *arg)
UNIV_INTERN os_thread_ret_t srv_LRU_dump_restore_thread (void *arg)
UNIV_INTERN ibool srv_printf_innodb_monitor (FILE *file, ibool nowait, ulint *trx_start, ulint *trx_end)
UNIV_INTERN void srv_export_innodb_status (void)
UNIV_INTERN void srv_inc_activity_count (void)
UNIV_INTERN os_thread_ret_t srv_purge_thread (void *)
UNIV_INTERN void srv_que_task_enqueue_low (que_thr_t *thr)
UNIV_INTERN ibool srv_is_any_background_thread_active (void)

Variables

const char * srv_main_thread_op_info
os_event_t srv_lock_timeout_thread_event
os_event_t srv_monitor_event
os_event_t srv_timeout_event
os_event_t srv_error_event
uint srv_lower_case_table_names
mutex_t srv_monitor_file_mutex
FILE * srv_monitor_file
mutex_t srv_dict_tmpfile_mutex
FILE * srv_dict_tmpfile
mutex_t srv_misc_tmpfile_mutex
FILE * srv_misc_tmpfile
char * srv_data_home
my_bool srv_file_per_table
ulint srv_file_format
ulint srv_max_file_format_at_startup
ibool srv_locks_unsafe_for_binlog
my_bool srv_use_native_aio
ulint srv_n_data_files
char ** srv_data_file_names
ulint * srv_data_file_sizes
ulint * srv_data_file_is_raw_partition
ibool srv_auto_extend_last_data_file
ulint srv_last_file_size_max
char ** srv_log_group_home_dirs
unsigned int srv_auto_extend_increment
ibool srv_created_new_raw
ulint srv_n_log_groups
ulint srv_n_log_files
ulint srv_log_file_size
ulint srv_log_buffer_size
ulong srv_flush_log_at_trx_commit
bool srv_adaptive_flushing
const byte * srv_latin1_ordering
my_bool srv_use_sys_malloc
ulint srv_buf_pool_size
ulint srv_buf_pool_instances
ulint srv_buf_pool_old_size
ulint srv_buf_pool_curr_size
ulint srv_mem_pool_size
ulint srv_lock_table_size
ulint srv_n_file_io_threads
ulong srv_read_ahead_threshold
ulint srv_n_read_io_threads
ulint srv_n_write_io_threads
ulong srv_io_capacity
ulong srv_innodb_stats_method
char * srv_file_flush_method_str
ulint srv_unix_file_flush_method
ulint srv_win_file_flush_method
ulint srv_max_n_open_files
ulint srv_max_dirty_pages_pct
ulint srv_force_recovery
ulong srv_thread_concurrency
ulint srv_max_n_threads
lint srv_conc_n_threads
ulint srv_fast_shutdown
ibool srv_innodb_status
ib_uint64_t srv_stats_sample_pages
ibool srv_use_doublewrite_buf
ibool srv_use_checksums
ulong srv_max_buf_pool_modified_pct
ulong srv_max_purge_lag
ulong srv_replication_delay
uint64_t srv_ibuf_max_size
uint32_t srv_ibuf_active_contract
uint32_t srv_ibuf_accel_rate
uint32_t srv_checkpoint_age_target
uint32_t srv_flush_neighbor_pages
uint32_t srv_read_ahead
uint32_t srv_adaptive_flushing_method
ibool srv_read_only
ibool srv_fake_write
ibool srv_apply_log_only
ulint srv_n_rows_inserted
ulint srv_n_rows_updated
ulint srv_n_rows_deleted
ulint srv_n_rows_read
ibool srv_print_innodb_monitor
ibool srv_print_innodb_lock_monitor
ibool srv_print_innodb_tablespace_monitor
ibool srv_print_verbose_log
ibool srv_print_innodb_table_monitor
ibool srv_lock_timeout_active
ibool srv_monitor_active
ibool srv_error_monitor_active
ulong srv_n_spin_wait_rounds
ulong srv_n_free_tickets_to_enter
ulong srv_thread_sleep_delay
ulong srv_spin_wait_delay
ibool srv_priority_boost
ulint srv_truncated_status_writes
ulint srv_activity_count
ulint srv_fatal_semaphore_wait_threshold
ulint srv_dml_needed_delay
mutex_t * kernel_mutex_temp
mutex_t * commit_id_mutex_temp
const char * srv_io_thread_op_info []
const char * srv_io_thread_function []
ulint srv_log_write_requests
ulint srv_log_writes
ulint srv_os_log_written
ulint srv_os_log_pending_writes
ulint srv_log_waits
ulong srv_n_purge_threads
ulong srv_purge_batch_size
ulong srv_rollback_segments
ulint srv_data_read
ulint srv_data_written
ulint srv_dblwr_writes
ulint srv_dblwr_pages_written
ulint srv_buf_pool_write_requests
ulint srv_buf_pool_wait_free
ulint srv_buf_pool_flushed
ulint srv_buf_pool_reads
uint32_t srv_auto_lru_dump
export_struc export_vars
srv_sys_t * srv_sys
ulint srv_n_threads_active []

Detailed Description

The server main program

Created 10/10/1995 Heikki Tuuri

Definition in file srv0srv.h.

Macro Definition Documentation

◆ commit_id_mutex

#define commit_id_mutex   (*commit_id_mutex_temp)

Definition at line 293 of file srv0srv.h.

◆ kernel_mutex

#define kernel_mutex   (*kernel_mutex_temp)

Definition at line 292 of file srv0srv.h.

◆ PCT_IO

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

Definition at line 184 of file srv0srv.h.

◆ srv0srv_h

#define srv0srv_h

Definition at line 43 of file srv0srv.h.

◆ SRV_AUTO_EXTEND_INCREMENT

#define SRV_AUTO_EXTEND_INCREMENT    (srv_auto_extend_increment * ((1024 * 1024) / UNIV_PAGE_SIZE))

Definition at line 77 of file srv0srv.h.

◆ SRV_MAX_N_IO_THREADS

#define SRV_MAX_N_IO_THREADS   130

Definition at line 295 of file srv0srv.h.

◆ srv_print_buf_io

#define srv_print_buf_io   FALSE

Definition at line 277 of file srv0srv.h.

◆ srv_print_latch_waits

#define srv_print_latch_waits   FALSE

Definition at line 279 of file srv0srv.h.

◆ srv_print_lock_waits

#define srv_print_lock_waits   FALSE

Definition at line 276 of file srv0srv.h.

◆ srv_print_log_io

#define srv_print_log_io   FALSE

Definition at line 278 of file srv0srv.h.

◆ srv_print_thread_releases

#define srv_print_thread_releases   FALSE

Definition at line 275 of file srv0srv.h.

Typedef Documentation

◆ export_struc

Status variables to be passed to MySQL

Definition at line 361 of file srv0srv.h.

◆ srv_slot_t

typedef struct srv_slot_struct srv_slot_t

Thread slot in the thread table

Definition at line 786 of file srv0srv.h.

◆ srv_stats_method_name_t

typedef enum srv_stats_method_name_enum srv_stats_method_name_t

Definition at line 467 of file srv0srv.h.

◆ srv_sys_t

typedef struct srv_sys_struct srv_sys_t

The server system

Definition at line 367 of file srv0srv.h.

◆ srv_table_t

Thread table is an array of slots

Definition at line 789 of file srv0srv.h.

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

Definition at line 437 of file srv0srv.h.

◆ anonymous enum

anonymous enum

Types of raw partitions in innodb_data_file_path

Enumerator
SRV_NOT_RAW 

Not a raw partition

SRV_NEW_RAW 

A 'newraw' partition, only to be initialized

SRV_OLD_RAW 

An initialized raw partition

Definition at line 405 of file srv0srv.h.

◆ anonymous enum

anonymous enum

Alternatives for the file flush option in Unix; see the InnoDB manual about what these mean

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

SRV_UNIX_ALL_O_DIRECT 

Open log file also with O_DIRECT

Definition at line 414 of file srv0srv.h.

◆ anonymous enum

anonymous enum

Alternatives for file i/o in Windows

Enumerator
SRV_WIN_IO_NORMAL 

buffered I/O

SRV_WIN_IO_UNBUFFERED 

unbuffered I/O; this is the default

Definition at line 427 of file srv0srv.h.

◆ srv_stats_method_name_enum

enum srv_stats_method_name_enum

Definition at line 458 of file srv0srv.h.

◆ srv_thread_type

Types of threads existing in the system.

Enumerator
SRV_WORKER 

threads serving parallelized queries and queries released from lock wait

SRV_MASTER 

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

Definition at line 471 of file srv0srv.h.

Function Documentation

◆ srv_active_wake_master_thread()

UNIV_INTERN void srv_active_wake_master_thread ( 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 InnoDB 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).

Definition at line 2617 of file srv0srv.cc.

◆ srv_boot()

UNIV_INTERN ulint srv_boot ( void )

Boots Innobase server.

Returns
DB_SUCCESS or error code

Boots the InnoDB server.

Returns
DB_SUCCESS or error code

Definition at line 1511 of file srv0srv.cc.

◆ srv_conc_enter_innodb()

UNIV_INTERN void srv_conc_enter_innodb ( trx_t * trx)

Puts an OS thread to wait if there are too many concurrent threads (>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. in: transaction object associated with the thread

Puts an OS thread to wait if there are too many concurrent threads (>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue.

Parameters
trxin: transaction object associated with the thread

Definition at line 1213 of file srv0srv.cc.

◆ srv_conc_exit_innodb()

UNIV_INTERN void srv_conc_exit_innodb ( trx_t * trx)

This must be called when a thread exits InnoDB. in: transaction object associated with the thread

This must be called when a thread exits InnoDB.

Parameters
trxin: transaction object associated with the thread

Definition at line 1455 of file srv0srv.cc.

◆ srv_conc_force_enter_innodb()

UNIV_INTERN void srv_conc_force_enter_innodb ( trx_t * trx)

This lets a thread enter InnoDB regardless of the number of threads inside InnoDB. This must be called when a thread ends a lock wait. in: transaction object associated with the thread

This lets a thread enter InnoDB regardless of the number of threads inside InnoDB. This must be called when a thread ends a lock wait.

Parameters
trxin: transaction object associated with the thread

Definition at line 1373 of file srv0srv.cc.

◆ srv_conc_force_exit_innodb()

UNIV_INTERN void srv_conc_force_exit_innodb ( trx_t * trx)

This must be called when a thread exits InnoDB in a lock wait or at the end of an SQL statement. in: transaction object associated with the thread

This must be called when a thread exits InnoDB in a lock wait or at the end of an SQL statement.

Parameters
trxin: transaction object associated with the thread

Definition at line 1399 of file srv0srv.cc.

◆ srv_error_monitor_thread()

UNIV_INTERN os_thread_ret_t srv_error_monitor_thread ( void * arg)

in: a dummy parameter required by os_thread_create

A thread which prints warnings about semaphore waits which have lasted too long. These can be used to track bugs which cause hangs.

Returns
a dummy parameter
Parameters
argin: a dummy parameter required by os_thread_create

Definition at line 2424 of file srv0srv.cc.

◆ srv_export_innodb_status()

UNIV_INTERN void srv_export_innodb_status ( void )

Function to pass InnoDB status variables to MySQL

Definition at line 2061 of file srv0srv.cc.

◆ srv_free()

UNIV_INTERN void srv_free ( void )

Frees the data structures created in srv_init().

Definition at line 1165 of file srv0srv.cc.

◆ srv_general_init()

UNIV_INTERN void srv_general_init ( void )

Initializes the synchronization primitives, memory system, and the thread local storage.

Definition at line 1192 of file srv0srv.cc.

◆ srv_get_n_threads()

UNIV_INTERN ulint srv_get_n_threads ( void )

Gets the number of threads in the system.

Returns
sum of srv_n_threads[]

Definition at line 873 of file srv0srv.cc.

◆ srv_inc_activity_count()

UNIV_INTERN void srv_inc_activity_count ( void )

Increment the server activity counter.

◆ srv_init()

UNIV_INTERN void srv_init ( void )

Initializes the server.

Definition at line 1082 of file srv0srv.cc.

◆ srv_is_any_background_thread_active()

UNIV_INTERN ibool srv_is_any_background_thread_active ( void )

Check whether any background thread is active.

Returns
FALSE if all are are suspended or have exited.

Definition at line 2589 of file srv0srv.cc.

◆ srv_lock_timeout_thread()

UNIV_INTERN os_thread_ret_t srv_lock_timeout_thread ( void * arg)

A thread which wakes up threads whose lock wait may have lasted too long.

Returns
a dummy parameter in: a dummy parameter required by os_thread_create

A thread which wakes up threads whose lock wait may have lasted too long.

Returns
a dummy parameter

Definition at line 2316 of file srv0srv.cc.

◆ srv_LRU_dump_restore_thread()

UNIV_INTERN os_thread_ret_t srv_LRU_dump_restore_thread ( void * arg)

A thread which restores the buffer pool from a dump file on startup and does periodic buffer pool dumps.

Returns
a dummy parameter in: a dummy parameter required by os_thread_create

A thread which restores the buffer pool from a dump file on startup and does periodic buffer pool dumps.

Returns
a dummy parameter
Parameters
argin: a dummy parameter required by os_thread_create

Definition at line 2540 of file srv0srv.cc.

◆ srv_master_thread()

UNIV_INTERN os_thread_ret_t srv_master_thread ( void * arg)

The master thread controlling the server.

Returns
a dummy parameter in: a dummy parameter required by os_thread_create

The master thread controlling the server.

Returns
a dummy parameter
Parameters
argin: a dummy parameter required by os_thread_create

Definition at line 2744 of file srv0srv.cc.

◆ srv_monitor_thread()

UNIV_INTERN os_thread_ret_t srv_monitor_thread ( void * arg)

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

Returns
a dummy parameter in: a dummy parameter required by os_thread_create

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

Returns
a dummy parameter
Parameters
argin: a dummy parameter required by os_thread_create

Definition at line 2151 of file srv0srv.cc.

◆ srv_mysql50_table_name_prefix()

const std::string srv_mysql50_table_name_prefix ( "#mysql50#" )
static

Prefix used by MySQL to indicate pre-5.1 table name encoding LOOKIE HERE!!!! This used to be srv_mysql50_table_name_prefix[10] which was a buffer overrun, because it didn't allow for the trailing '\0'. Thanks C++!

◆ srv_printf_innodb_monitor()

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

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

Outputs to a file the output of the InnoDB Monitor.

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

Definition at line 1869 of file srv0srv.cc.

◆ srv_purge_thread()

UNIV_INTERN os_thread_ret_t srv_purge_thread ( void * )

Asynchronous purge thread.

Returns
a dummy parameter in: a dummy parameter required by os_thread_create

Asynchronous purge thread.

Returns
a dummy parameter

Definition at line 3462 of file srv0srv.cc.

◆ srv_que_task_enqueue_low()

UNIV_INTERN 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

Enqueues a task to server task queue and releases a worker thread, if there is a suspended one.

Parameters
thrin: query thread

Definition at line 3577 of file srv0srv.cc.

◆ srv_release_mysql_thread_if_suspended()

UNIV_INTERN void srv_release_mysql_thread_if_suspended ( que_thr_t * thr)

Releases a MySQL OS thread waiting for a lock to be released, if the thread is already suspended. in: query thread associated with the MySQL OS thread

Releases a MySQL OS thread waiting for a lock to be released, if the thread is already suspended.

Parameters
thrin: query thread associated with the MySQL OS thread

Definition at line 1809 of file srv0srv.cc.

◆ srv_release_threads()

UNIV_INTERN ulint srv_release_threads ( enum 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

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
Parameters
typein: thread type
nin: number of threads to release

Definition at line 1001 of file srv0srv.cc.

◆ srv_set_io_thread_op_info()

UNIV_INTERN 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

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

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

Definition at line 841 of file srv0srv.cc.

◆ srv_suspend_mysql_thread()

UNIV_INTERN void srv_suspend_mysql_thread ( que_thr_t * thr)

Puts a MySQL OS thread to wait for a lock to be released. If an error occurs during the wait trx->error_state associated with thr is != DB_SUCCESS when we return. DB_LOCK_WAIT_TIMEOUT and DB_DEADLOCK are possible errors. DB_DEADLOCK is returned if selective deadlock resolution chose this transaction as a victim. in: query thread associated with the MySQL OS thread

Puts a MySQL OS thread to wait for a lock to be released. If an error occurs during the wait trx->error_state associated with thr is != DB_SUCCESS when we return. DB_LOCK_WAIT_TIMEOUT and DB_DEADLOCK are possible errors. DB_DEADLOCK is returned if selective deadlock resolution chose this transaction as a victim.

Parameters
thrin: query thread associated with the MySQL OS thread

Definition at line 1610 of file srv0srv.cc.

◆ srv_thread_has_reserved_slot()

UNIV_INTERN ulint srv_thread_has_reserved_slot ( enum srv_thread_type type)

Check whether thread type has reserved a slot.

Returns
slot number or UNDEFINED if not found in: thread type to check

Check whether thread type has reserved a slot. Return the first slot that is found. This works because we currently have only 1 thread of each type.

Returns
slot number or ULINT_UNDEFINED if not found
Parameters
typein: thread type to check

Definition at line 1052 of file srv0srv.cc.

◆ srv_wake_master_thread()

UNIV_INTERN void srv_wake_master_thread ( void )

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

Definition at line 2660 of file srv0srv.cc.

◆ srv_wake_purge_thread()

UNIV_INTERN void srv_wake_purge_thread ( void )

Wakes up the purge thread if it's not already awake.

Definition at line 2676 of file srv0srv.cc.

◆ srv_wake_purge_thread_if_not_active()

UNIV_INTERN 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 kernel mutex, for performace reasons).

Definition at line 2640 of file srv0srv.cc.

Variable Documentation

◆ commit_id_mutex_temp

mutex_t* commit_id_mutex_temp
extern

Definition at line 793 of file srv0srv.cc.

◆ export_vars

export_struc export_vars
extern

Status variables to be passed to MySQL

Definition at line 378 of file srv0srv.cc.

◆ kernel_mutex_temp

mutex_t* kernel_mutex_temp
extern

Definition at line 791 of file srv0srv.cc.

◆ srv_activity_count

ulint srv_activity_count
extern

Definition at line 98 of file srv0srv.cc.

◆ srv_adaptive_flushing

bool srv_adaptive_flushing
extern

Definition at line 193 of file srv0srv.cc.

◆ srv_adaptive_flushing_method

uint32_t srv_adaptive_flushing_method
extern

Definition at line 466 of file srv0srv.cc.

◆ srv_apply_log_only

ibool srv_apply_log_only
extern

Definition at line 472 of file srv0srv.cc.

◆ srv_auto_extend_increment

unsigned int srv_auto_extend_increment
extern

Definition at line 173 of file srv0srv.cc.

◆ srv_auto_extend_last_data_file

ibool srv_auto_extend_last_data_file
extern

Definition at line 167 of file srv0srv.cc.

◆ srv_auto_lru_dump

uint32_t srv_auto_lru_dump
extern

Time in seconds between automatic buffer pool dumps

Definition at line 375 of file srv0srv.cc.

◆ srv_buf_pool_curr_size

ulint srv_buf_pool_curr_size
extern

current size in bytes

Definition at line 259 of file srv0srv.cc.

◆ srv_buf_pool_flushed

ulint srv_buf_pool_flushed
extern

Definition at line 368 of file srv0srv.cc.

◆ srv_buf_pool_instances

ulint srv_buf_pool_instances
extern

requested number of buffer pool instances

Definition at line 255 of file srv0srv.cc.

◆ srv_buf_pool_old_size

ulint srv_buf_pool_old_size
extern

previously requested size

Definition at line 257 of file srv0srv.cc.

◆ srv_buf_pool_reads

ulint srv_buf_pool_reads
extern

Number of buffer pool reads that led to the reading of a disk page

Definition at line 372 of file srv0srv.cc.

◆ srv_buf_pool_size

ulint srv_buf_pool_size
extern

requested size in bytes

Definition at line 253 of file srv0srv.cc.

◆ srv_buf_pool_wait_free

ulint srv_buf_pool_wait_free
extern

Definition at line 364 of file srv0srv.cc.

◆ srv_buf_pool_write_requests

ulint srv_buf_pool_write_requests
extern

Definition at line 359 of file srv0srv.cc.

◆ srv_checkpoint_age_target

uint32_t srv_checkpoint_age_target
extern

Definition at line 462 of file srv0srv.cc.

◆ srv_conc_n_threads

lint srv_conc_n_threads
extern

Definition at line 407 of file srv0srv.cc.

◆ srv_created_new_raw

ibool srv_created_new_raw
extern

Definition at line 179 of file srv0srv.cc.

◆ srv_data_file_is_raw_partition

ulint* srv_data_file_is_raw_partition
extern

Definition at line 174 of file srv0srv.cc.

◆ srv_data_file_names

char** srv_data_file_names
extern

Definition at line 162 of file srv0srv.cc.

◆ srv_data_file_sizes

ulint* srv_data_file_sizes
extern

Definition at line 164 of file srv0srv.cc.

◆ srv_data_home

char* srv_data_home
extern

Definition at line 118 of file srv0srv.cc.

◆ srv_data_read

ulint srv_data_read
extern

Definition at line 324 of file srv0srv.cc.

◆ srv_data_written

ulint srv_data_written
extern

Definition at line 332 of file srv0srv.cc.

◆ srv_dblwr_pages_written

ulint srv_dblwr_pages_written
extern

Definition at line 356 of file srv0srv.cc.

◆ srv_dblwr_writes

ulint srv_dblwr_writes
extern

Definition at line 352 of file srv0srv.cc.

◆ srv_dict_tmpfile

FILE* srv_dict_tmpfile
extern

Definition at line 551 of file srv0srv.cc.

◆ srv_dict_tmpfile_mutex

mutex_t srv_dict_tmpfile_mutex
extern

Definition at line 549 of file srv0srv.cc.

◆ srv_dml_needed_delay

ulint srv_dml_needed_delay
extern

Definition at line 105 of file srv0srv.cc.

◆ srv_error_event

os_event_t srv_error_event
extern

Definition at line 781 of file srv0srv.cc.

◆ srv_error_monitor_active

ibool srv_error_monitor_active
extern

Definition at line 109 of file srv0srv.cc.

◆ srv_fake_write

ibool srv_fake_write
extern

Definition at line 471 of file srv0srv.cc.

◆ srv_fast_shutdown

ulint srv_fast_shutdown
extern

Definition at line 441 of file srv0srv.cc.

◆ srv_fatal_semaphore_wait_threshold

ulint srv_fatal_semaphore_wait_threshold
extern

Definition at line 101 of file srv0srv.cc.

◆ srv_file_flush_method_str

char* srv_file_flush_method_str
extern

Definition at line 298 of file srv0srv.cc.

◆ srv_file_format

ulint srv_file_format
extern

The file format to use on new *.ibd files.

Definition at line 127 of file srv0srv.cc.

◆ srv_file_per_table

my_bool srv_file_per_table
extern

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

Definition at line 125 of file srv0srv.cc.

◆ srv_flush_log_at_trx_commit

ulong srv_flush_log_at_trx_commit
extern

Definition at line 189 of file srv0srv.cc.

◆ srv_flush_neighbor_pages

uint32_t srv_flush_neighbor_pages
extern

Definition at line 463 of file srv0srv.cc.

◆ srv_force_recovery

ulint srv_force_recovery
extern

Definition at line 383 of file srv0srv.cc.

◆ srv_ibuf_accel_rate

uint32_t srv_ibuf_accel_rate
extern

Definition at line 457 of file srv0srv.cc.

◆ srv_ibuf_active_contract

uint32_t srv_ibuf_active_contract
extern

Definition at line 456 of file srv0srv.cc.

◆ srv_ibuf_max_size

uint64_t srv_ibuf_max_size
extern

Definition at line 455 of file srv0srv.cc.

◆ srv_innodb_stats_method

ulong srv_innodb_stats_method
extern

Definition at line 329 of file srv0srv.cc.

◆ srv_innodb_status

ibool srv_innodb_status
extern

Definition at line 444 of file srv0srv.cc.

◆ srv_io_capacity

ulong srv_io_capacity
extern

Definition at line 305 of file srv0srv.cc.

◆ srv_io_thread_function

const char* srv_io_thread_function[]
extern

Definition at line 520 of file srv0srv.cc.

◆ srv_io_thread_op_info

const char* srv_io_thread_op_info[]
extern

Definition at line 519 of file srv0srv.cc.

◆ srv_last_file_size_max

ulint srv_last_file_size_max
extern

Definition at line 170 of file srv0srv.cc.

◆ srv_latin1_ordering

const byte* srv_latin1_ordering
extern

The sort order table of the MySQL latin1_swedish_ci character set collation

Definition at line 246 of file srv0srv.cc.

◆ srv_lock_table_size

ulint srv_lock_table_size
extern

Definition at line 262 of file srv0srv.cc.

◆ srv_lock_timeout_active

ibool srv_lock_timeout_active
extern

Definition at line 107 of file srv0srv.cc.

◆ srv_lock_timeout_thread_event

os_event_t srv_lock_timeout_thread_event
extern

Definition at line 783 of file srv0srv.cc.

◆ srv_locks_unsafe_for_binlog

ibool srv_locks_unsafe_for_binlog
extern

Place locks to records only i.e. do not use next-key locking except on duplicate key checking and foreign key checking

Definition at line 138 of file srv0srv.cc.

◆ srv_log_buffer_size

ulint srv_log_buffer_size
extern

Definition at line 188 of file srv0srv.cc.

◆ srv_log_file_size

ulint srv_log_file_size
extern

Definition at line 186 of file srv0srv.cc.

◆ srv_log_group_home_dirs

char** srv_log_group_home_dirs
extern

Definition at line 181 of file srv0srv.cc.

◆ srv_log_waits

ulint srv_log_waits
extern

Definition at line 348 of file srv0srv.cc.

◆ srv_log_write_requests

ulint srv_log_write_requests
extern

Definition at line 335 of file srv0srv.cc.

◆ srv_log_writes

ulint srv_log_writes
extern

Definition at line 338 of file srv0srv.cc.

◆ srv_lower_case_table_names

uint srv_lower_case_table_names
extern

Definition at line 94 of file srv0srv.cc.

◆ srv_main_thread_op_info

const char* srv_main_thread_op_info
extern

Definition at line 111 of file srv0srv.cc.

◆ srv_max_buf_pool_modified_pct

ulong srv_max_buf_pool_modified_pct
extern

Definition at line 312 of file srv0srv.cc.

◆ srv_max_file_format_at_startup

ulint srv_max_file_format_at_startup
extern

Whether to check file format during startup. A value of DICT_TF_FORMAT_MAX + 1 means no checking ie. FALSE. The default is to set it to the highest format we support.

Definition at line 131 of file srv0srv.cc.

◆ srv_max_n_open_files

ulint srv_max_n_open_files
extern

Definition at line 302 of file srv0srv.cc.

◆ srv_max_n_threads

ulint srv_max_n_threads
extern

Definition at line 389 of file srv0srv.cc.

◆ srv_max_purge_lag

ulong srv_max_purge_lag
extern

Definition at line 1206 of file srv0srv.cc.

◆ srv_mem_pool_size

ulint srv_mem_pool_size
extern

Definition at line 261 of file srv0srv.cc.

◆ srv_misc_tmpfile

FILE* srv_misc_tmpfile
extern

Definition at line 557 of file srv0srv.cc.

◆ srv_misc_tmpfile_mutex

mutex_t srv_misc_tmpfile_mutex
extern

Definition at line 555 of file srv0srv.cc.

◆ srv_monitor_active

ibool srv_monitor_active
extern

Definition at line 108 of file srv0srv.cc.

◆ srv_monitor_event

os_event_t srv_monitor_event
extern

Definition at line 779 of file srv0srv.cc.

◆ srv_monitor_file

FILE* srv_monitor_file
extern

Definition at line 545 of file srv0srv.cc.

◆ srv_monitor_file_mutex

mutex_t srv_monitor_file_mutex
extern

Definition at line 527 of file srv0srv.cc.

◆ srv_n_data_files

ulint srv_n_data_files
extern

Definition at line 161 of file srv0srv.cc.

◆ srv_n_file_io_threads

ulint srv_n_file_io_threads
extern

Definition at line 266 of file srv0srv.cc.

◆ srv_n_free_tickets_to_enter

ulong srv_n_free_tickets_to_enter
extern

Definition at line 476 of file srv0srv.cc.

◆ srv_n_log_files

ulint srv_n_log_files
extern

Definition at line 184 of file srv0srv.cc.

◆ srv_n_log_groups

ulint srv_n_log_groups
extern

Definition at line 183 of file srv0srv.cc.

◆ srv_n_purge_threads

ulong srv_n_purge_threads
extern

Definition at line 315 of file srv0srv.cc.

◆ srv_n_read_io_threads

ulint srv_n_read_io_threads
extern

Definition at line 267 of file srv0srv.cc.

◆ srv_n_rows_deleted

ulint srv_n_rows_deleted
extern

Definition at line 491 of file srv0srv.cc.

◆ srv_n_rows_inserted

ulint srv_n_rows_inserted
extern

Definition at line 489 of file srv0srv.cc.

◆ srv_n_rows_read

ulint srv_n_rows_read
extern

Definition at line 492 of file srv0srv.cc.

◆ srv_n_rows_updated

ulint srv_n_rows_updated
extern

Definition at line 490 of file srv0srv.cc.

◆ srv_n_spin_wait_rounds

ulong srv_n_spin_wait_rounds
extern

Definition at line 475 of file srv0srv.cc.

◆ srv_n_threads_active

ulint srv_n_threads_active[]
extern

Definition at line 834 of file srv0srv.cc.

◆ srv_n_write_io_threads

ulint srv_n_write_io_threads
extern

Definition at line 268 of file srv0srv.cc.

◆ srv_os_log_pending_writes

ulint srv_os_log_pending_writes
extern

Definition at line 344 of file srv0srv.cc.

◆ srv_os_log_written

ulint srv_os_log_written
extern

Definition at line 341 of file srv0srv.cc.

◆ srv_print_innodb_lock_monitor

ibool srv_print_innodb_lock_monitor
extern

Definition at line 512 of file srv0srv.cc.

◆ srv_print_innodb_monitor

ibool srv_print_innodb_monitor
extern

Definition at line 511 of file srv0srv.cc.

◆ srv_print_innodb_table_monitor

ibool srv_print_innodb_table_monitor
extern

Definition at line 514 of file srv0srv.cc.

◆ srv_print_innodb_tablespace_monitor

ibool srv_print_innodb_tablespace_monitor
extern

Definition at line 513 of file srv0srv.cc.

◆ srv_print_verbose_log

ibool srv_print_verbose_log
extern

Definition at line 510 of file srv0srv.cc.

◆ srv_priority_boost

ibool srv_priority_boost
extern

Definition at line 479 of file srv0srv.cc.

◆ srv_purge_batch_size

ulong srv_purge_batch_size
extern

Definition at line 318 of file srv0srv.cc.

◆ srv_read_ahead

uint32_t srv_read_ahead
extern

Definition at line 465 of file srv0srv.cc.

◆ srv_read_ahead_threshold

ulong srv_read_ahead_threshold
extern

Definition at line 280 of file srv0srv.cc.

◆ srv_read_only

ibool srv_read_only
extern

Definition at line 470 of file srv0srv.cc.

◆ srv_replication_delay

ulong srv_replication_delay
extern

Definition at line 453 of file srv0srv.cc.

◆ srv_rollback_segments

ulong srv_rollback_segments
extern

Definition at line 321 of file srv0srv.cc.

◆ srv_spin_wait_delay

ulong srv_spin_wait_delay
extern

Definition at line 478 of file srv0srv.cc.

◆ srv_stats_sample_pages

ib_uint64_t srv_stats_sample_pages
extern

Definition at line 448 of file srv0srv.cc.

◆ srv_sys

srv_sys_t* srv_sys
extern

The server system

Definition at line 785 of file srv0srv.cc.

◆ srv_thread_concurrency

ulong srv_thread_concurrency
extern

Definition at line 399 of file srv0srv.cc.

◆ srv_thread_sleep_delay

ulong srv_thread_sleep_delay
extern

Definition at line 477 of file srv0srv.cc.

◆ srv_timeout_event

os_event_t srv_timeout_event
extern

Definition at line 777 of file srv0srv.cc.

◆ srv_truncated_status_writes

ulint srv_truncated_status_writes
extern

Definition at line 504 of file srv0srv.cc.

◆ srv_unix_file_flush_method

ulint srv_unix_file_flush_method
extern

Definition at line 299 of file srv0srv.cc.

◆ srv_use_checksums

ibool srv_use_checksums
extern

Definition at line 451 of file srv0srv.cc.

◆ srv_use_doublewrite_buf

ibool srv_use_doublewrite_buf
extern

Definition at line 450 of file srv0srv.cc.

◆ srv_use_native_aio

my_bool srv_use_native_aio
extern

Definition at line 144 of file srv0srv.cc.

◆ srv_use_sys_malloc

my_bool srv_use_sys_malloc
extern

Definition at line 251 of file srv0srv.cc.

◆ srv_win_file_flush_method

ulint srv_win_file_flush_method
extern

Definition at line 300 of file srv0srv.cc.