diff options
Diffstat (limited to 'storage/innobase/include/srv0srv.h')
-rw-r--r-- | storage/innobase/include/srv0srv.h | 65 |
1 files changed, 44 insertions, 21 deletions
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index d78c8113aee..fc9401a12f5 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved. +Copyright (c) 1995, 2011, Innobase Oy. All Rights Reserved. Copyright (c) 2008, 2009, Google Inc. Copyright (c) 2009, Percona Inc. @@ -57,14 +57,20 @@ extern const char srv_mysql50_table_name_prefix[9]; thread starts running */ extern os_event_t srv_lock_timeout_thread_event; +/* The monitor thread waits on this event. */ +extern os_event_t srv_monitor_event; + +/* The lock timeout thread waits on this event. */ +extern os_event_t srv_timeout_event; + +/* The error monitor thread waits on this event. */ +extern os_event_t srv_error_event; + /* If the last data file is auto-extended, we add this many pages to it at a time */ #define SRV_AUTO_EXTEND_INCREMENT \ (srv_auto_extend_increment * ((1024 * 1024) / UNIV_PAGE_SIZE)) -/* This is set to TRUE if the MySQL user has set it in MySQL */ -extern ibool srv_lower_case_table_names; - /* Mutex for locking srv_monitor_file */ extern mutex_t srv_monitor_file_mutex; /* Temporary file for innodb monitor output */ @@ -163,6 +169,11 @@ capacity. PCT_IO(5) -> returns the number of IO operations that is 5% of the max where max is srv_io_capacity. */ #define PCT_IO(p) ((ulong) (srv_io_capacity * ((double) p / 100.0))) +/* The "innodb_stats_method" setting, decides how InnoDB is going +to treat NULL value when collecting statistics. It is not defined +as enum type because the configure option takes unsigned integer type. */ +extern ulong srv_innodb_stats_method; + #ifdef UNIV_LOG_ARCHIVE extern ibool srv_log_archive_on; extern ibool srv_archive_recovery; @@ -225,6 +236,8 @@ extern ulong srv_thread_sleep_delay; extern ulong srv_spin_wait_delay; extern ibool srv_priority_boost; +extern ulint srv_truncated_status_writes; + extern ulint srv_mem_pool_size; extern ulint srv_lock_table_size; @@ -278,9 +291,12 @@ extern ulint srv_log_waits; /* the number of purge threads to use from the worker pool (currently 0 or 1) */ extern ulong srv_n_purge_threads; -/* the number of records to purge in one batch */ +/* the number of pages to purge in one batch */ extern ulong srv_purge_batch_size; +/* the number of rollback segments to use */ +extern ulong srv_rollback_segments; + /* variable that counts amount of data read in total (in bytes) */ extern ulint srv_data_read; @@ -407,19 +423,24 @@ enum { in connection with recovery */ }; +/* Alternatives for srv_innodb_stats_method, which could be changed by +setting innodb_stats_method */ +enum srv_stats_method_name_enum { + SRV_STATS_NULLS_EQUAL, /* All NULL values are treated as + equal. This is the default setting + for innodb_stats_method */ + SRV_STATS_NULLS_UNEQUAL, /* All NULL values are treated as + NOT equal. */ + SRV_STATS_NULLS_IGNORED /* NULL values are ignored */ +}; + +typedef enum srv_stats_method_name_enum srv_stats_method_name_t; + #ifndef UNIV_HOTBACKUP /** Types of threads existing in the system. */ enum srv_thread_type { - SRV_COM = 1, /**< threads serving communication and queries */ - SRV_CONSOLE, /**< thread serving console */ - SRV_WORKER, /**< threads serving parallelized queries and + SRV_WORKER = 0, /**< threads serving parallelized queries and queries released from lock wait */ -#if 0 - /* Utility threads */ - SRV_BUFFER, /**< thread flushing dirty buffer blocks */ - SRV_RECOVERY, /**< threads finishing a recovery */ - SRV_INSERT, /**< thread flushing the insert buffer to disk */ -#endif SRV_MASTER /**< the master thread, (whose type number must be biggest) */ }; @@ -458,12 +479,13 @@ ulint srv_get_n_threads(void); /*===================*/ /*********************************************************************//** -Returns the calling thread type. -@return SRV_COM, ... */ - -enum srv_thread_type -srv_get_thread_type(void); -/*=====================*/ +Check whether thread type has reserved a slot. +@return slot number or UNDEFINED if not found*/ +UNIV_INTERN +ulint +srv_thread_has_reserved_slot( +/*=========================*/ + enum srv_thread_type type); /*!< in: thread type to check */ /*********************************************************************//** Sets the info describing an i/o thread current state. */ UNIV_INTERN @@ -710,11 +732,12 @@ struct export_var_struct{ ulint innodb_rows_inserted; /*!< srv_n_rows_inserted */ ulint innodb_rows_updated; /*!< srv_n_rows_updated */ ulint innodb_rows_deleted; /*!< srv_n_rows_deleted */ + ulint innodb_truncated_status_writes; /*!< srv_truncated_status_writes */ }; /** Thread slot in the thread table */ typedef struct srv_slot_struct srv_slot_t; - + /** Thread table is an array of slots */ typedef srv_slot_t srv_table_t; |