101
101
/** Whether to check file format during startup. A value of
102
102
DICT_TF_FORMAT_MAX + 1 means no checking ie. FALSE. The default is to
103
103
set it to the highest format we support. */
104
extern ulint srv_check_file_format_at_startup;
104
extern ulint srv_max_file_format_at_startup;
105
105
/** Place locks to records only i.e. do not use next-key locking except
106
106
on duplicate key checking and foreign key checking */
107
107
extern ibool srv_locks_unsafe_for_binlog;
108
108
#endif /* !UNIV_HOTBACKUP */
110
/* If this flag is TRUE, then we will use the native aio of the
111
OS (provided we compiled Innobase with it in), otherwise we will
112
use simulated aio we build below with threads.
113
Currently we support native aio on windows and linux */
114
extern my_bool srv_use_native_aio;
110
115
extern ulint srv_n_data_files;
111
116
extern char** srv_data_file_names;
112
117
extern ulint* srv_data_file_sizes;
142
147
# endif /* UNIV_HOTBACKUP */
143
148
#endif /* BUILD_DRIZZLE */
144
149
extern ulint srv_buf_pool_size; /*!< requested size in bytes */
150
extern ulint srv_buf_pool_instances; /*!< requested number of buffer pool instances */
145
151
extern ulint srv_buf_pool_old_size; /*!< previously requested size */
146
152
extern ulint srv_buf_pool_curr_size; /*!< current size in bytes */
147
153
extern ulint srv_mem_pool_size;
269
275
log buffer and have to flush it */
270
276
extern ulint srv_log_waits;
278
/* the number of purge threads to use from the worker pool (currently 0 or 1) */
279
extern ulong srv_n_purge_threads;
281
/* the number of records to purge in one batch */
282
extern ulong srv_purge_batch_size;
272
284
/* variable that counts amount of data read in total (in bytes) */
273
285
extern ulint srv_data_read;
311
323
/** The server system */
312
324
extern srv_sys_t* srv_sys;
326
# ifdef UNIV_PFS_THREAD
327
/* Keys to register InnoDB threads with performance schema */
328
extern mysql_pfs_key_t trx_rollback_clean_thread_key;
329
extern mysql_pfs_key_t io_handler_thread_key;
330
extern mysql_pfs_key_t srv_lock_timeout_thread_key;
331
extern mysql_pfs_key_t srv_error_monitor_thread_key;
332
extern mysql_pfs_key_t srv_monitor_thread_key;
333
extern mysql_pfs_key_t srv_master_thread_key;
335
/* This macro register the current thread and its key with performance
337
# define pfs_register_thread(key) \
340
struct PSI_thread* psi = PSI_server->new_thread(key, NULL, 0);\
342
PSI_server->set_thread(psi); \
347
/* This macro delist the current thread from performance schema */
348
# define pfs_delete_thread() \
351
PSI_server->delete_current_thread(); \
354
# endif /* UNIV_PFS_THREAD */
313
356
#endif /* !UNIV_HOTBACKUP */
315
358
/** Types of raw partitions in innodb_data_file_path */
450
493
void* arg); /*!< in: a dummy parameter required by
451
494
os_thread_create */
452
495
/*******************************************************************//**
496
Wakes up the purge thread if it's not already awake. */
499
srv_wake_purge_thread(void);
500
/*=======================*/
501
/*******************************************************************//**
453
502
Tells the Innobase server that there has been activity in the database
454
503
and wakes up the master thread if it is suspended (not sleeping). Used
455
504
in the MySQL interface. Note that there is a small chance that the master
466
515
srv_wake_master_thread(void);
467
516
/*========================*/
517
/*******************************************************************//**
518
Tells the purge thread that there has been activity in the database
519
and wakes up the purge thread if it is suspended (not sleeping). Note
520
that there is a small chance that the purge thread stays suspended
521
(we do not protect our operation with the kernel mutex, for
522
performace reasons). */
525
srv_wake_purge_thread_if_not_active(void);
526
/*=====================================*/
468
527
/*********************************************************************//**
469
528
Puts an OS thread to wait if there are too many concurrent threads
470
529
(>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. */
571
630
srv_export_innodb_status(void);
572
631
/*==========================*/
574
/** Thread slot in the thread table */
575
typedef struct srv_slot_struct srv_slot_t;
577
/** Thread table is an array of slots */
578
typedef srv_slot_t srv_table_t;
633
/******************************************************************//**
634
Increment the server activity counter. */
637
srv_inc_activity_count(void);
638
/*=========================*/
640
/*********************************************************************//**
641
Asynchronous purge thread.
642
@return a dummy parameter */
647
void* arg __attribute__((unused))); /*!< in: a dummy parameter
648
required by os_thread_create */
650
/**********************************************************************//**
651
Enqueues a task to server task queue and releases a worker thread, if there
652
is a suspended one. */
655
srv_que_task_enqueue_low(
656
/*=====================*/
657
que_thr_t* thr); /*!< in: query thread */
659
/**********************************************************************//**
660
Check whether any background thread is active.
661
@return FALSE if all are are suspended or have exited. */
664
srv_is_any_background_thread_active(void);
665
/*======================================*/
580
667
/** Status variables to be passed to MySQL */
581
668
struct export_var_struct{
631
718
ulint innodb_rows_deleted; /*!< srv_n_rows_deleted */
721
/** Thread slot in the thread table */
722
typedef struct srv_slot_struct srv_slot_t;
724
/** Thread table is an array of slots */
725
typedef srv_slot_t srv_table_t;
634
727
/** The server system struct */
635
728
struct srv_sys_struct{
636
729
srv_table_t* threads; /*!< server thread table */
641
734
extern ulint srv_n_threads_active[];
643
735
#else /* !UNIV_HOTBACKUP */
736
# define srv_use_adaptive_hash_indexes FALSE
644
737
# define srv_use_checksums TRUE
645
# define srv_use_adaptive_hash_indexes FALSE
738
# define srv_use_native_aio FALSE
646
739
# define srv_force_recovery 0UL
647
740
# define srv_set_io_thread_op_info(t,info) ((void) 0)
648
741
# define srv_is_being_started 0