Commit 13f8420a authored by unknown's avatar unknown

InnoDB: Add configuration option innodb_autoextend_increment


innobase/include/srv0srv.h:
  Add srv_auto_extend_increment and make SRV_AUTO_EXTEND_INCREMENT
  configureable by it
innobase/srv/srv0srv.c:
  Add srv_auto_extend_increment
sql/ha_innodb.cc:
  Add innobase_auto_extend_increment and srv_auto_extend_increment
sql/ha_innodb.h:
  Add innobase_auto_extend_increment
sql/mysqld.cc:
  Add "innodb_autoextend_increment" configuration option
parent 5f8f320c
...@@ -24,7 +24,8 @@ extern os_event_t srv_lock_timeout_thread_event; ...@@ -24,7 +24,8 @@ extern os_event_t srv_lock_timeout_thread_event;
/* If the last data file is auto-extended, we add this many pages to it /* If the last data file is auto-extended, we add this many pages to it
at a time */ at a time */
#define SRV_AUTO_EXTEND_INCREMENT (8 * ((1024 * 1024) / UNIV_PAGE_SIZE)) #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 */ /* This is set to TRUE if the MySQL user has set it in MySQL */
extern ibool srv_lower_case_table_names; extern ibool srv_lower_case_table_names;
...@@ -51,6 +52,7 @@ extern ulint* srv_data_file_is_raw_partition; ...@@ -51,6 +52,7 @@ extern ulint* srv_data_file_is_raw_partition;
extern ibool srv_auto_extend_last_data_file; extern ibool srv_auto_extend_last_data_file;
extern ulint srv_last_file_size_max; extern ulint srv_last_file_size_max;
extern ulint srv_auto_extend_increment;
extern ibool srv_created_new_raw; extern ibool srv_created_new_raw;
......
...@@ -92,6 +92,9 @@ ulint srv_last_file_size_max = 0; /* if != 0, this tells ...@@ -92,6 +92,9 @@ ulint srv_last_file_size_max = 0; /* if != 0, this tells
the max size auto-extending the max size auto-extending
may increase the last data may increase the last data
file size */ file size */
ulint srv_auto_extend_increment = 8; /* If the last data file is
auto-extended, we add this
many pages to it at a time */
ulint* srv_data_file_is_raw_partition = NULL; ulint* srv_data_file_is_raw_partition = NULL;
/* If the following is TRUE we do not allow inserts etc. This protects /* If the following is TRUE we do not allow inserts etc. This protects
......
...@@ -97,7 +97,7 @@ long innobase_mirrored_log_groups, innobase_log_files_in_group, ...@@ -97,7 +97,7 @@ long innobase_mirrored_log_groups, innobase_log_files_in_group,
innobase_buffer_pool_size, innobase_additional_mem_pool_size, innobase_buffer_pool_size, innobase_additional_mem_pool_size,
innobase_file_io_threads, innobase_lock_wait_timeout, innobase_file_io_threads, innobase_lock_wait_timeout,
innobase_thread_concurrency, innobase_force_recovery, innobase_thread_concurrency, innobase_force_recovery,
innobase_open_files; innobase_open_files, innobase_auto_extend_increment;
/* The default values for the following char* start-up parameters /* The default values for the following char* start-up parameters
are determined in innobase_init below: */ are determined in innobase_init below: */
...@@ -963,6 +963,7 @@ innobase_init(void) ...@@ -963,6 +963,7 @@ innobase_init(void)
srv_locks_unsafe_for_binlog = (ibool) innobase_locks_unsafe_for_binlog; srv_locks_unsafe_for_binlog = (ibool) innobase_locks_unsafe_for_binlog;
srv_max_n_open_files = (ulint) innobase_open_files; srv_max_n_open_files = (ulint) innobase_open_files;
srv_auto_extend_increment = (ulint) innobase_auto_extend_increment;
srv_innodb_status = (ibool) innobase_create_status_file; srv_innodb_status = (ibool) innobase_create_status_file;
srv_print_verbose_log = mysql_embedded ? 0 : 1; srv_print_verbose_log = mysql_embedded ? 0 : 1;
......
...@@ -183,6 +183,7 @@ extern long innobase_buffer_pool_awe_mem_mb; ...@@ -183,6 +183,7 @@ extern long innobase_buffer_pool_awe_mem_mb;
extern long innobase_file_io_threads, innobase_lock_wait_timeout; extern long innobase_file_io_threads, innobase_lock_wait_timeout;
extern long innobase_force_recovery, innobase_thread_concurrency; extern long innobase_force_recovery, innobase_thread_concurrency;
extern long innobase_open_files; extern long innobase_open_files;
extern long innobase_auto_extend_increment;
extern char *innobase_data_home_dir, *innobase_data_file_path; extern char *innobase_data_home_dir, *innobase_data_file_path;
extern char *innobase_log_group_home_dir, *innobase_log_arch_dir; extern char *innobase_log_group_home_dir, *innobase_log_arch_dir;
extern char *innobase_unix_file_flush_method; extern char *innobase_unix_file_flush_method;
......
...@@ -3962,6 +3962,7 @@ enum options_mysqld ...@@ -3962,6 +3962,7 @@ enum options_mysqld
OPT_INNODB_STATUS_FILE, OPT_INNODB_STATUS_FILE,
OPT_INNODB_MAX_DIRTY_PAGES_PCT, OPT_INNODB_MAX_DIRTY_PAGES_PCT,
OPT_INNODB_OPEN_FILES, OPT_INNODB_OPEN_FILES,
OPT_INNODB_AUTOEXTEND_INCREMENT,
OPT_BDB_CACHE_SIZE, OPT_BDB_CACHE_SIZE,
OPT_BDB_LOG_BUFFER_SIZE, OPT_BDB_LOG_BUFFER_SIZE,
OPT_BDB_MAX_LOCK, OPT_BDB_MAX_LOCK,
...@@ -4709,6 +4710,11 @@ replicating a LOAD DATA INFILE command.", ...@@ -4709,6 +4710,11 @@ replicating a LOAD DATA INFILE command.",
"How many files at the maximum InnoDB keeps open at the same time.", "How many files at the maximum InnoDB keeps open at the same time.",
(gptr*) &innobase_open_files, (gptr*) &innobase_open_files, 0, (gptr*) &innobase_open_files, (gptr*) &innobase_open_files, 0,
GET_LONG, REQUIRED_ARG, 300L, 10L, ~0L, 0, 1L, 0}, GET_LONG, REQUIRED_ARG, 300L, 10L, ~0L, 0, 1L, 0},
{"innodb_autoextend_increment", OPT_INNODB_AUTOEXTEND_INCREMENT,
"Data file autoextend increment in megabytes",
(gptr*) &innobase_auto_extend_increment,
(gptr*) &innobase_auto_extend_increment,
0, GET_LONG, REQUIRED_ARG, 8L, 1L, ~0L, 0, 1L, 0},
#ifdef HAVE_REPLICATION #ifdef HAVE_REPLICATION
/* /*
Disabled for the 4.1.3 release. Disabling just this paragraph of code is Disabled for the 4.1.3 release. Disabling just this paragraph of code is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment