MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
srv0srv.cc File Reference
#include "srv0srv.h"
#include "ut0mem.h"
#include "ut0ut.h"
#include "os0proc.h"
#include "mem0mem.h"
#include "mem0pool.h"
#include "sync0sync.h"
#include "que0que.h"
#include "log0recv.h"
#include "pars0pars.h"
#include "usr0sess.h"
#include "lock0lock.h"
#include "trx0purge.h"
#include "ibuf0ibuf.h"
#include "buf0flu.h"
#include "buf0lru.h"
#include "btr0sea.h"
#include "dict0load.h"
#include "dict0boot.h"
#include "dict0stats_bg.h"
#include "srv0start.h"
#include "row0mysql.h"
#include "ha_prototypes.h"
#include "trx0i_s.h"
#include "os0sync.h"
#include "srv0mon.h"
#include "ut0crc32.h"
#include "mysql/plugin.h"
#include "mysql/service_thd_wait.h"
Include dependency graph for srv0srv.cc:

Go to the source code of this file.

Classes

struct  srv_sys_t

Macros

#define MAX_MUTEX_NOWAIT   20
#define MUTEX_NOWAIT(mutex_skipped)   ((mutex_skipped) < MAX_MUTEX_NOWAIT)
#define SRV_MASTER_CHECKPOINT_INTERVAL   (7)
#define SRV_MASTER_PURGE_INTERVAL   (10)
#define SRV_MASTER_DICT_LRU_INTERVAL   (47)
#define srv_sys_mutex_enter()
#define srv_sys_mutex_own()
#define srv_sys_mutex_exit()
#define fetch_lock_wait_timeout(trx)

Functions

UNIV_INTERN void srv_set_io_thread_op_info (ulint i, const char *str)
UNIV_INTERN void srv_reset_io_thread_op_info ()
UNIV_INTERN ulint srv_release_threads (srv_thread_type type, ulint n)
UNIV_INTERN void srv_init (void)
UNIV_INTERN void srv_free (void)
UNIV_INTERN void srv_general_init (void)
UNIV_INTERN void srv_boot (void)
UNIV_INTERN ibool srv_printf_innodb_monitor (FILE *file, ibool nowait, ulint *trx_start_pos, ulint *trx_end)
UNIV_INTERN void srv_export_innodb_status (void)
UNIV_INTERN os_thread_ret_t
DECLARE_THREAD() 
srv_monitor_thread (void *arg __attribute__((unused)))
UNIV_INTERN os_thread_ret_t
DECLARE_THREAD() 
srv_error_monitor_thread (void *arg __attribute__((unused)))
UNIV_INTERN void srv_inc_activity_count (void)
UNIV_INTERN srv_thread_type srv_get_active_thread_type (void)
UNIV_INTERN const char * srv_any_background_threads_are_active (void)
UNIV_INTERN void srv_active_wake_master_thread (void)
UNIV_INTERN void srv_wake_purge_thread_if_not_active (void)
UNIV_INTERN void srv_wake_master_thread (void)
UNIV_INTERN ulint srv_get_activity_count (void)
UNIV_INTERN ibool srv_check_activity (ulint old_activity_count)
UNIV_INTERN os_thread_ret_t
DECLARE_THREAD() 
srv_master_thread (void *arg __attribute__((unused)))
UNIV_INTERN os_thread_ret_t
DECLARE_THREAD() 
srv_worker_thread (void *arg __attribute__((unused)))
UNIV_INTERN os_thread_ret_t
DECLARE_THREAD() 
srv_purge_coordinator_thread (void *arg __attribute__((unused)))
UNIV_INTERN void srv_que_task_enqueue_low (que_thr_t *thr)
UNIV_INTERN ulint srv_get_task_queue_length (void)
UNIV_INTERN void srv_purge_wakeup (void)

Variables

UNIV_INTERN ulint srv_fatal_semaphore_wait_threshold = 600
UNIV_INTERN ulint srv_dml_needed_delay = 0
UNIV_INTERN ibool srv_monitor_active = FALSE
UNIV_INTERN ibool srv_error_monitor_active = FALSE
UNIV_INTERN ibool srv_buf_dump_thread_active = FALSE
UNIV_INTERN ibool srv_dict_stats_thread_active = FALSE
UNIV_INTERN const char * srv_main_thread_op_info = ""
const char srv_mysql50_table_name_prefix [10] = "#mysql50#"
UNIV_INTERN char * srv_data_home = NULL
UNIV_INTERN char * srv_undo_dir = NULL
UNIV_INTERN ulong srv_undo_tablespaces = 8
UNIV_INTERN ulint srv_undo_tablespaces_open = 8
UNIV_INTERN ulong srv_undo_logs = 1
UNIV_INTERN my_bool srv_read_only_mode
UNIV_INTERN my_bool srv_file_per_table
UNIV_INTERN ulint srv_file_format = 0
UNIV_INTERN ulint srv_max_file_format_at_startup = UNIV_FORMAT_MAX
UNIV_INTERN ibool srv_locks_unsafe_for_binlog = FALSE
UNIV_INTERN ulong srv_sort_buf_size = 1048576
UNIV_INTERN unsigned long long srv_online_max_size
UNIV_INTERN my_bool srv_use_native_aio = TRUE
UNIV_INTERN ulint srv_n_data_files = 0
UNIV_INTERN char ** srv_data_file_names = NULL
UNIV_INTERN ulint * srv_data_file_sizes = NULL
UNIV_INTERN ibool srv_auto_extend_last_data_file = FALSE
UNIV_INTERN ulint srv_last_file_size_max = 0
UNIV_INTERN ulong srv_auto_extend_increment = 8
UNIV_INTERN ulint * srv_data_file_is_raw_partition = NULL
UNIV_INTERN ibool srv_created_new_raw = FALSE
UNIV_INTERN char * srv_log_group_home_dir = NULL
UNIV_INTERN ulong srv_n_log_files = SRV_N_LOG_FILES_MAX
UNIV_INTERN ib_uint64_t srv_log_file_size = IB_UINT64_MAX
UNIV_INTERN ib_uint64_t srv_log_file_size_requested
UNIV_INTERN ulint srv_log_buffer_size = ULINT_MAX
UNIV_INTERN ulong srv_flush_log_at_trx_commit = 1
UNIV_INTERN uint srv_flush_log_at_timeout = 1
UNIV_INTERN ulong srv_page_size = UNIV_PAGE_SIZE_DEF
UNIV_INTERN ulong srv_page_size_shift = UNIV_PAGE_SIZE_SHIFT_DEF
UNIV_INTERN char srv_adaptive_flushing = TRUE
UNIV_INTERN const byte * srv_latin1_ordering
UNIV_INTERN my_bool srv_use_sys_malloc = TRUE
UNIV_INTERN ulint srv_buf_pool_size = ULINT_MAX
UNIV_INTERN ulint srv_buf_pool_instances = 1
UNIV_INTERN ulong srv_n_page_hash_locks = 16
UNIV_INTERN ulong srv_LRU_scan_depth = 1024
UNIV_INTERN ulong srv_flush_neighbors = 1
UNIV_INTERN ulint srv_buf_pool_old_size
UNIV_INTERN ulint srv_buf_pool_curr_size = 0
UNIV_INTERN ulint srv_mem_pool_size = ULINT_MAX
UNIV_INTERN ulint srv_lock_table_size = ULINT_MAX
UNIV_INTERN ulint srv_n_file_io_threads = ULINT_MAX
UNIV_INTERN ulint srv_n_read_io_threads = ULINT_MAX
UNIV_INTERN ulint srv_n_write_io_threads = ULINT_MAX
UNIV_INTERN my_bool srv_random_read_ahead = FALSE
UNIV_INTERN ulong srv_read_ahead_threshold = 56
UNIV_INTERN ulong srv_insert_buffer_batch_size = 20
UNIV_INTERN char * srv_file_flush_method_str = NULL
UNIV_INTERN ulint srv_unix_file_flush_method = SRV_UNIX_FSYNC
UNIV_INTERN ulint srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED
UNIV_INTERN ulint srv_max_n_open_files = 300
UNIV_INTERN ulong srv_io_capacity = 200
UNIV_INTERN ulong srv_max_io_capacity = 400
UNIV_INTERN ulong srv_max_buf_pool_modified_pct = 75
UNIV_INTERN ulong srv_max_dirty_pages_pct_lwm = 50
UNIV_INTERN ulong srv_adaptive_flushing_lwm = 10
UNIV_INTERN ulong srv_flushing_avg_loops = 30
UNIV_INTERN ulong srv_n_purge_threads = 1
UNIV_INTERN ulong srv_purge_batch_size = 20
UNIV_INTERN ulong srv_innodb_stats_method = SRV_STATS_NULLS_EQUAL
UNIV_INTERN srv_stats_t srv_stats
UNIV_INTERN export_var_t export_vars
UNIV_INTERN ulong srv_force_recovery
UNIV_INTERN ulong srv_force_recovery_crash
UNIV_INTERN my_bool srv_print_all_deadlocks = FALSE
UNIV_INTERN my_bool srv_cmp_per_index_enabled = FALSE
UNIV_INTERN ulint srv_fast_shutdown = 0
UNIV_INTERN ibool srv_innodb_status = FALSE
UNIV_INTERN unsigned long long srv_stats_transient_sample_pages = 8
UNIV_INTERN my_bool srv_stats_persistent = TRUE
UNIV_INTERN unsigned long long srv_stats_persistent_sample_pages = 20
UNIV_INTERN my_bool srv_stats_auto_recalc = TRUE
UNIV_INTERN ibool srv_use_doublewrite_buf = TRUE
UNIV_INTERN ulong srv_doublewrite_batch_size = 120
UNIV_INTERN ulong srv_replication_delay = 0
UNIV_INTERN ulong srv_n_spin_wait_rounds = 30
UNIV_INTERN ulong srv_spin_wait_delay = 6
UNIV_INTERN ibool srv_priority_boost = TRUE
UNIV_INTERN ulint srv_truncated_status_writes = 0
UNIV_INTERN ulint srv_available_undo_logs = 0
UNIV_INTERN ibool srv_print_verbose_log = TRUE
UNIV_INTERN ibool srv_print_innodb_monitor = FALSE
UNIV_INTERN ibool srv_print_innodb_lock_monitor = FALSE
UNIV_INTERN ibool srv_print_innodb_tablespace_monitor = FALSE
UNIV_INTERN ibool srv_print_innodb_table_monitor = FALSE
UNIV_INTERN const char * srv_io_thread_op_info [SRV_MAX_N_IO_THREADS]
UNIV_INTERN const char * srv_io_thread_function [SRV_MAX_N_IO_THREADS]
UNIV_INTERN time_t srv_last_monitor_time
UNIV_INTERN ib_mutex_t srv_innodb_monitor_mutex
UNIV_INTERN ib_mutex_t srv_monitor_file_mutex
UNIV_INTERN FILE * srv_monitor_file
UNIV_INTERN ib_mutex_t srv_dict_tmpfile_mutex
UNIV_INTERN FILE * srv_dict_tmpfile
UNIV_INTERN ib_mutex_t srv_misc_tmpfile_mutex
UNIV_INTERN FILE * srv_misc_tmpfile
UNIV_INTERN ulint srv_main_thread_process_no = 0
UNIV_INTERN ulint srv_main_thread_id = 0
UNIV_INTERN ib_mutex_t server_mutex
UNIV_INTERN os_event_t srv_monitor_event
UNIV_INTERN os_event_t srv_error_event
UNIV_INTERN os_event_t srv_buf_dump_event
UNIV_INTERN char * srv_buf_dump_filename
UNIV_INTERN char srv_buffer_pool_dump_at_shutdown = FALSE
UNIV_INTERN char srv_buffer_pool_load_at_startup = FALSE

Detailed Description

The database server main program

Created 10/8/1995 Heikki Tuuri

Definition in file srv0srv.cc.

Macro Definition Documentation

#define fetch_lock_wait_timeout (   trx)
Value:
((trx)->lock.allowed_to_wait \
? thd_lock_wait_timeout((trx)->mysql_thd) \
: 0)

Definition at line 477 of file srv0srv.cc.

#define MAX_MUTEX_NOWAIT   20
Maximum number of times allowed to conditionally acquire

mutex before switching to blocking wait on the mutex

Definition at line 202 of file srv0srv.cc.

#define MUTEX_NOWAIT (   mutex_skipped)    ((mutex_skipped) < MAX_MUTEX_NOWAIT)
Check whether the number of failed nonblocking mutex

acquisition attempts exceeds maximum allowed value. If so, srv_printf_innodb_monitor() will request mutex acquisition with mutex_enter(), which will wait until it gets the mutex.

Definition at line 208 of file srv0srv.cc.

#define srv_sys_mutex_enter ( )
Value:
do { \
mutex_enter(&srv_sys->mutex); \
} while (0)

Acquire the system_mutex.

Definition at line 464 of file srv0srv.cc.

#define srv_sys_mutex_exit ( )
Value:
do { \
mutex_exit(&srv_sys->mutex); \
} while (0)

Release the system mutex.

Definition at line 473 of file srv0srv.cc.

#define srv_sys_mutex_own ( )
Value:
(mutex_own(&srv_sys->mutex) \

Test if the system mutex is owned.

Definition at line 469 of file srv0srv.cc.

Function Documentation

UNIV_INTERN void srv_active_wake_master_thread ( void  )

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 1871 of file srv0srv.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN const char* srv_any_background_threads_are_active ( void  )

Check whether any background thread are active. If so print which thread is active. Send the threads wakeup signal.

Returns
name of thread that is active or NULL

Definition at line 1835 of file srv0srv.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN void srv_boot ( void  )

Boots the InnoDB server.

Definition at line 1055 of file srv0srv.cc.

Here is the call graph for this function:

UNIV_INTERN ibool srv_check_activity ( ulint  old_activity_count)

Check if there has been any activity.

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

Definition at line 1959 of file srv0srv.cc.

Here is the caller graph for this function:

UNIV_INTERN os_thread_ret_t DECLARE_THREAD() srv_error_monitor_thread ( void *arg   __attribute__(unused))

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
__attribute__in: a dummy parameter required by os_thread_create

Definition at line 1667 of file srv0srv.cc.

Here is the call graph for this function:

UNIV_INTERN void srv_export_innodb_status ( void  )

Function to pass InnoDB status variables to MySQL

Definition at line 1309 of file srv0srv.cc.

Here is the call graph for this function:

UNIV_INTERN void srv_free ( void  )

Frees the data structures created in srv_init().

Definition at line 988 of file srv0srv.cc.

Here is the call graph for this function:

UNIV_INTERN void srv_general_init ( void  )

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

Definition at line 1011 of file srv0srv.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN srv_thread_type srv_get_active_thread_type ( void  )

Check whether any background thread is active. If so return the thread type.

Returns
SRV_NONE if all are suspended or have exited, thread type if any are still active.

Definition at line 1797 of file srv0srv.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1948 of file srv0srv.cc.

Here is the caller graph for this function:

UNIV_INTERN ulint srv_get_task_queue_length ( void  )

Get count of tasks in the queue.

Returns
number of tasks in queue

Definition at line 2838 of file srv0srv.cc.

Here is the caller graph for this function:

UNIV_INTERN void srv_inc_activity_count ( void  )

Increment the server activity count.

Definition at line 1784 of file srv0srv.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN void srv_init ( void  )

Initializes the server.

Definition at line 909 of file srv0srv.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN os_thread_ret_t DECLARE_THREAD() srv_master_thread ( void *arg   __attribute__(unused))

The master thread controlling the server.

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

Definition at line 2303 of file srv0srv.cc.

Here is the call graph for this function:

UNIV_INTERN os_thread_ret_t DECLARE_THREAD() srv_monitor_thread ( void *arg   __attribute__(unused))

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

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

Definition at line 1492 of file srv0srv.cc.

Here is the call graph for this function:

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

Definition at line 1108 of file srv0srv.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN os_thread_ret_t DECLARE_THREAD() srv_purge_coordinator_thread ( void *arg   __attribute__(unused))

Purge coordinator thread that schedules the purge tasks.

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

Definition at line 2707 of file srv0srv.cc.

Here is the call graph for this function:

UNIV_INTERN void srv_purge_wakeup ( void  )

Wakeup the purge threads.

Definition at line 2858 of file srv0srv.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters
thrin: query thread

Definition at line 2819 of file srv0srv.cc.

Here is the call graph for this function:

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

Definition at line 816 of file srv0srv.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN void srv_reset_io_thread_op_info ( )

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

Definition at line 643 of file srv0srv.cc.

UNIV_INTERN void srv_set_io_thread_op_info ( ulint  i,
const char *  str 
)

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 628 of file srv0srv.cc.

Here is the caller graph for this function:

UNIV_INTERN void srv_wake_master_thread ( void  )

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

Definition at line 1932 of file srv0srv.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

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 check with the srv_sys_t:mutex and the purge_sys->latch, for performance reasons).

Definition at line 1916 of file srv0srv.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN os_thread_ret_t DECLARE_THREAD() srv_worker_thread ( void *arg   __attribute__(unused))

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

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

Definition at line 2447 of file srv0srv.cc.

Here is the call graph for this function:

Variable Documentation

UNIV_INTERN export_var_t export_vars

Status variables to be passed to MySQL

Definition at line 302 of file srv0srv.cc.

UNIV_INTERN ib_mutex_t server_mutex

Mutex protecting some server global variables.

Definition at line 579 of file srv0srv.cc.

UNIV_INTERN os_event_t srv_buf_dump_event

Event to signal the buffer pool dump/load thread

Definition at line 591 of file srv0srv.cc.

UNIV_INTERN char* srv_buf_dump_filename

The buffer pool dump/load file name

Definition at line 594 of file srv0srv.cc.

UNIV_INTERN ulint srv_buf_pool_curr_size = 0

current size in bytes

Definition at line 229 of file srv0srv.cc.

UNIV_INTERN ulint srv_buf_pool_instances = 1

requested number of buffer pool instances

Definition at line 219 of file srv0srv.cc.

UNIV_INTERN ulint srv_buf_pool_old_size

previously requested size

Definition at line 227 of file srv0srv.cc.

UNIV_INTERN ulint srv_buf_pool_size = ULINT_MAX

requested size in bytes

Definition at line 217 of file srv0srv.cc.

UNIV_INTERN char srv_buffer_pool_dump_at_shutdown = FALSE
Boolean config knobs that tell InnoDB to dump the buffer pool at shutdown

and/or load it during startup.

Definition at line 598 of file srv0srv.cc.

UNIV_INTERN my_bool srv_cmp_per_index_enabled = FALSE

Enable INFORMATION_SCHEMA.innodb_cmp_per_index

Definition at line 320 of file srv0srv.cc.

UNIV_INTERN FILE* srv_dict_tmpfile

Temporary file for output from the data dictionary

Definition at line 420 of file srv0srv.cc.

UNIV_INTERN ib_mutex_t srv_dict_tmpfile_mutex
Mutex for locking srv_dict_tmpfile. Not created if srv_read_only_mode.

This mutex has a very high rank; threads reserving it should not be holding any InnoDB latches.

Definition at line 418 of file srv0srv.cc.

UNIV_INTERN ulong srv_doublewrite_batch_size = 120
doublewrite buffer is 1MB is size i.e.: it can hold 128 16K pages.

The following parameter is the size of the buffer that is used for batch flushing i.e.: LRU flushing and flush_list flushing. The rest of the pages are used for single page flushing.

Definition at line 348 of file srv0srv.cc.

UNIV_INTERN os_event_t srv_error_event

Event to signal the error thread

Definition at line 588 of file srv0srv.cc.

UNIV_INTERN ulint srv_fast_shutdown = 0

If this is 1, do not do a purge and index buffer merge. If this 2, do not even flush the buffer pool to data files at the shutdown: we effectively 'crash' InnoDB (but lose no committed transactions).

Definition at line 326 of file srv0srv.cc.

UNIV_INTERN ulint srv_file_format = 0

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

Definition at line 124 of file srv0srv.cc.

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

Definition at line 122 of file srv0srv.cc.

UNIV_INTERN ulong srv_flush_neighbors = 1

whether or not to flush neighbors of a block

Definition at line 225 of file srv0srv.cc.

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

Definition at line 308 of file srv0srv.cc.

UNIV_INTERN ulong srv_force_recovery_crash
Inject a crash at different steps of the recovery process.

This is for testing and debugging only.

Definition at line 312 of file srv0srv.cc.

UNIV_INTERN const byte* srv_latin1_ordering
The sort order table of the MySQL latin1_swedish_ci character set

collation

Definition at line 212 of file srv0srv.cc.

UNIV_INTERN ibool srv_locks_unsafe_for_binlog = FALSE
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 136 of file srv0srv.cc.

UNIV_INTERN ulong srv_LRU_scan_depth = 1024

Scan depth for LRU flush batch i.e.: number of blocks scanned

Definition at line 223 of file srv0srv.cc.

UNIV_INTERN ulint srv_max_file_format_at_startup = UNIV_FORMAT_MAX
Whether to check file format during startup.  A value of

UNIV_FORMAT_MAX + 1 means no checking ie. FALSE. The default is to set it to the highest format we support.

Definition at line 128 of file srv0srv.cc.

UNIV_INTERN FILE* srv_misc_tmpfile

Temporary file for miscellanous diagnostic output

Definition at line 426 of file srv0srv.cc.

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

Definition at line 424 of file srv0srv.cc.

UNIV_INTERN os_event_t srv_monitor_event

Event to signal the monitor thread.

Definition at line 585 of file srv0srv.cc.

UNIV_INTERN FILE* srv_monitor_file

Temporary file for innodb monitor output

Definition at line 414 of file srv0srv.cc.

const char srv_mysql50_table_name_prefix[10] = "#mysql50#"

Prefix used by MySQL to indicate pre-5.1 table name encoding

Definition at line 91 of file srv0srv.cc.

UNIV_INTERN ulong srv_n_page_hash_locks = 16

number of locks to protect buf_pool->page_hash

Definition at line 221 of file srv0srv.cc.

UNIV_INTERN unsigned long long srv_online_max_size

Maximum modification log file size for online index creation

Definition at line 140 of file srv0srv.cc.

UNIV_INTERN my_bool srv_print_all_deadlocks = FALSE

Print all user-level transactions deadlocks to mysqld stderr

Definition at line 317 of file srv0srv.cc.

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

Definition at line 119 of file srv0srv.cc.

UNIV_INTERN ulong srv_sort_buf_size = 1048576

Sort buffer size in index creation

Definition at line 138 of file srv0srv.cc.

UNIV_INTERN srv_stats_t srv_stats

Global counters

Definition at line 299 of file srv0srv.cc.

UNIV_INTERN char* srv_undo_dir = NULL

Rollback files directory, can be absolute.

Definition at line 101 of file srv0srv.cc.

UNIV_INTERN ulong srv_undo_tablespaces = 8

The number of tablespaces to use for rollback segments.

Definition at line 104 of file srv0srv.cc.

UNIV_INTERN ulint srv_undo_tablespaces_open = 8

The number of UNDO tablespaces that are open and ready to use.

Definition at line 107 of file srv0srv.cc.