diff -ruN ../mysql-5.5.8/storage/innobase/fsp/fsp0fsp.c ./storage/innobase/fsp/fsp0fsp.c --- ../mysql-5.5.8/storage/innobase/fsp/fsp0fsp.c 2010-12-03 09:58:26.000000000 -0800 +++ ./storage/innobase/fsp/fsp0fsp.c 2011-03-22 13:34:28.000000000 -0700 @@ -1179,7 +1179,7 @@ ut_a(page_no >= size); success = fil_extend_space_to_desired_size(&actual_size, space, - page_no + 1); + page_no + srv_tablespace_extra_extend + 1); /* actual_size now has the space size in pages; it may be less than we wanted if we ran out of disk space */ diff -ruN ../mysql-5.5.8/storage/innobase/handler/ha_innodb.cc ./storage/innobase/handler/ha_innodb.cc --- ../mysql-5.5.8/storage/innobase/handler/ha_innodb.cc 2010-12-03 09:58:26.000000000 -0800 +++ ./storage/innobase/handler/ha_innodb.cc 2011-03-22 13:34:28.000000000 -0700 @@ -11194,6 +11194,13 @@ "trigger a readahead.", NULL, NULL, 56, 0, 64, 0); +static MYSQL_SYSVAR_ULONG(tablespace_extra_extend, + srv_tablespace_extra_extend, + PLUGIN_VAR_RQCMDARG, + "Number of extra pages added to tablespace when it needs " + "to grow", + NULL, NULL, 0, 0, LONG_MAX, 0); + static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(additional_mem_pool_size), MYSQL_SYSVAR(autoextend_increment), @@ -11255,6 +11262,7 @@ MYSQL_SYSVAR(change_buffering_debug), #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ MYSQL_SYSVAR(read_ahead_threshold), + MYSQL_SYSVAR(tablespace_extra_extend), MYSQL_SYSVAR(io_capacity), MYSQL_SYSVAR(purge_threads), MYSQL_SYSVAR(purge_batch_size), diff -ruN ../mysql-5.5.8/storage/innobase/include/srv0srv.h ./storage/innobase/include/srv0srv.h --- ../mysql-5.5.8/storage/innobase/include/srv0srv.h 2010-12-03 09:58:26.000000000 -0800 +++ ./storage/innobase/include/srv0srv.h 2011-03-22 13:34:28.000000000 -0700 @@ -164,6 +164,7 @@ extern ulong srv_read_ahead_threshold; extern ulint srv_n_read_io_threads; extern ulint srv_n_write_io_threads; +extern ulint srv_tablespace_extra_extend; /* Number of IO operations per second the server can do */ extern ulong srv_io_capacity; diff -ruN ../mysql-5.5.8/storage/innobase/srv/srv0srv.c ./storage/innobase/srv/srv0srv.c --- ../mysql-5.5.8/storage/innobase/srv/srv0srv.c 2010-12-03 09:58:26.000000000 -0800 +++ ./storage/innobase/srv/srv0srv.c 2011-03-22 13:34:28.000000000 -0700 @@ -231,6 +231,7 @@ in the buffer cache and accessed sequentially for InnoDB to trigger a readahead request. */ UNIV_INTERN ulong srv_read_ahead_threshold = 56; +ulint srv_tablespace_extra_extend = 0; #ifdef UNIV_LOG_ARCHIVE UNIV_INTERN ibool srv_log_archive_on = FALSE;