289
289
UNIV_INTERN ulint srv_max_n_threads = 0;
291
291
/** This mutex protects srv_conc data structures */
292
UNIV_STATIC os_fast_mutex_t srv_conc_mutex;
292
static os_fast_mutex_t srv_conc_mutex;
294
294
/** Number of OS threads waiting in the FIFO for a permission to enter
313
313
/** Queue of threads waiting to get in */
314
UNIV_STATIC UT_LIST_BASE_NODE_T(srv_conc_slot_t) srv_conc_queue;
314
static UT_LIST_BASE_NODE_T(srv_conc_slot_t) srv_conc_queue;
315
315
/** Array of wait slots */
316
UNIV_STATIC srv_conc_slot_t* srv_conc_slots;
316
static srv_conc_slot_t* srv_conc_slots;
318
318
/*-----------------------*/
319
319
UNIV_INTERN ib_shutdown_t srv_fast_shutdown = IB_SHUTDOWN_NORMAL;
348
348
UNIV_INTERN ulint srv_n_rows_deleted = 0;
349
349
UNIV_INTERN ulint srv_n_rows_read = 0;
351
UNIV_STATIC ulint srv_n_rows_inserted_old = 0;
352
UNIV_STATIC ulint srv_n_rows_updated_old = 0;
353
UNIV_STATIC ulint srv_n_rows_deleted_old = 0;
354
UNIV_STATIC ulint srv_n_rows_read_old = 0;
351
static ulint srv_n_rows_inserted_old = 0;
352
static ulint srv_n_rows_updated_old = 0;
353
static ulint srv_n_rows_deleted_old = 0;
354
static ulint srv_n_rows_read_old = 0;
356
356
UNIV_INTERN ulint srv_n_lock_wait_count = 0;
357
357
UNIV_INTERN ulint srv_n_lock_wait_current_count = 0;
367
367
UNIV_INTERN ibool srv_print_innodb_tablespace_monitor = FALSE;
368
368
UNIV_INTERN ibool srv_print_innodb_table_monitor = FALSE;
370
UNIV_STATIC time_t srv_last_monitor_time;
370
static time_t srv_last_monitor_time;
372
UNIV_STATIC mutex_t srv_innodb_monitor_mutex;
372
static mutex_t srv_innodb_monitor_mutex;
374
374
/** Mutex for locking srv_monitor_file */
375
375
UNIV_INTERN mutex_t srv_monitor_file_mutex;
377
377
#ifdef UNIV_LINUX
378
UNIV_STATIC ulint srv_main_thread_process_no = 0;
378
static ulint srv_main_thread_process_no = 0;
379
379
#endif /* UNIV_LINUX */
380
UNIV_STATIC ulint srv_main_thread_id = 0;
380
static ulint srv_main_thread_id = 0;
382
382
/* The following count work done by srv_master_thread. */
384
384
/** Iterations by the 'once per second' loop. */
385
UNIV_STATIC ulint srv_main_1_second_loops = 0;
385
static ulint srv_main_1_second_loops = 0;
386
386
/** Calls to sleep by the 'once per second' loop. */
387
UNIV_STATIC ulint srv_main_sleeps = 0;
387
static ulint srv_main_sleeps = 0;
388
388
/** Iterations by the 'once per 10 seconds' loop. */
389
UNIV_STATIC ulint srv_main_10_second_loops = 0;
389
static ulint srv_main_10_second_loops = 0;
390
390
/** Iterations of the loop bounded by the 'background_loop' label. */
391
UNIV_STATIC ulint srv_main_background_loops = 0;
391
static ulint srv_main_background_loops = 0;
392
392
/** Iterations of the loop bounded by the 'flush_loop' label. */
393
UNIV_STATIC ulint srv_main_flush_loops = 0;
393
static ulint srv_main_flush_loops = 0;
394
394
/** Log writes involving flush. */
395
UNIV_STATIC ulint srv_log_writes_and_flush = 0;
395
static ulint srv_log_writes_and_flush = 0;
397
397
/** This is only ever touched by the master thread. It records the
398
398
time when the last flush of log file has happened. The master
399
399
thread ensures that we flush the log files at least once per
401
UNIV_STATIC time_t srv_last_log_flush_time;
401
static time_t srv_last_log_flush_time;
403
403
/** The master thread performs various tasks based on the current
404
404
state of IO activity and the level of IO utilization is past
604
604
/** Table for client threads where they will be suspended to wait for locks */
605
UNIV_STATIC srv_slot_t* srv_client_table = NULL;
605
static srv_slot_t* srv_client_table = NULL;
607
607
UNIV_INTERN os_event_t srv_lock_timeout_thread_event;
609
UNIV_STATIC srv_sys_t* srv_sys = NULL;
609
static srv_sys_t* srv_sys = NULL;
611
611
/* padding to prevent other memory update hotspots from residing on
612
612
the same memory cache line */
622
622
are indexed by the type of the thread. */
624
624
UNIV_INTERN ulint srv_n_threads_active[SRV_MASTER + 1];
625
UNIV_STATIC ulint srv_n_threads[SRV_MASTER + 1];
625
static ulint srv_n_threads[SRV_MASTER + 1];
627
627
/***********************************************************************
628
628
Prints counters for work done by srv_master_thread. */
631
631
srv_print_master_thread_info(
632
632
/*=========================*/
1116
1116
/*********************************************************************//**
1117
1117
Normalizes init parameter values to use units we use inside InnoDB.
1118
1118
@return DB_SUCCESS or error code */
1121
1121
srv_normalize_init_values(void)
1122
1122
/*===========================*/
2192
2192
once every second in the background. This is to ensure that not more
2193
2193
than one second of trxs are lost in case of crash when
2194
2194
innodb_flush_logs_at_trx_commit != 1 */
2197
2197
srv_sync_log_buffer_in_background(void)
2198
2198
/*===================================*/