From: Date: October 3 2007 7:47am Subject: bk commit into 5.0 tree (tsmith:1.2508) BUG#20358 List-Archive: http://lists.mysql.com/commits/34798 X-Bug: 20358 Message-Id: <20071003054735.1BFDF41A259@sita.local> Below is the list of changes that have just been committed into a local 5.0 repository of tsmith. When tsmith does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-10-02 23:47:30-06:00, tsmith@stripped +4 -0 Bug #20358: InnoDB hang on the adaptive hash index latch in btr0sea.c Add --skip-innodb-adaptive-hash-index option, which is a way to work around the bug (by disabling the adaptive hash feature entirely). This may be useful even once the bug is fixed, for benchmarking purposes. There are some workloads for which the adaptive hash index is not effective. sql/ha_innodb.cc@stripped, 2007-10-02 23:47:25-06:00, tsmith@stripped +3 -0 Add --skip-innodb-adaptive-hash-index option. sql/ha_innodb.h@stripped, 2007-10-02 23:47:25-06:00, tsmith@stripped +2 -1 Add --skip-innodb-adaptive-hash-index option. sql/mysqld.cc@stripped, 2007-10-02 23:47:26-06:00, tsmith@stripped +8 -1 Add --skip-innodb-adaptive-hash-index option. sql/set_var.cc@stripped, 2007-10-02 23:47:26-06:00, tsmith@stripped +1 -0 Add --skip-innodb-adaptive-hash-index option. diff -Nrup a/sql/ha_innodb.cc b/sql/ha_innodb.cc --- a/sql/ha_innodb.cc 2007-08-15 16:54:19 -06:00 +++ b/sql/ha_innodb.cc 2007-10-02 23:47:25 -06:00 @@ -174,6 +174,7 @@ my_bool innobase_file_per_table = FALS my_bool innobase_locks_unsafe_for_binlog = FALSE; my_bool innobase_rollback_on_timeout = FALSE; my_bool innobase_create_status_file = FALSE; +my_bool innobase_adaptive_hash_index = TRUE; static char *internal_innobase_data_file_path = NULL; @@ -1375,6 +1376,8 @@ innobase_init(void) srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; srv_use_checksums = (ibool) innobase_use_checksums; + + srv_use_adaptive_hash_indexes = (ibool) innobase_adaptive_hash_index; os_use_large_pages = (ibool) innobase_use_large_pages; os_large_page_size = (ulint) innobase_large_page_size; diff -Nrup a/sql/ha_innodb.h b/sql/ha_innodb.h --- a/sql/ha_innodb.h 2007-04-18 19:36:17 -06:00 +++ b/sql/ha_innodb.h 2007-10-02 23:47:25 -06:00 @@ -217,7 +217,8 @@ extern my_bool innobase_log_archive, innobase_use_native_aio, innobase_file_per_table, innobase_locks_unsafe_for_binlog, innobase_rollback_on_timeout, - innobase_create_status_file; + innobase_create_status_file, + innobase_adaptive_hash_index; extern my_bool innobase_very_fast_shutdown; /* set this to 1 just before calling innobase_end() if you want InnoDB to shut down without diff -Nrup a/sql/mysqld.cc b/sql/mysqld.cc --- a/sql/mysqld.cc 2007-08-16 08:25:45 -06:00 +++ b/sql/mysqld.cc 2007-10-02 23:47:26 -06:00 @@ -4829,7 +4829,8 @@ enum options_mysqld OPT_MERGE, OPT_INNODB_ROLLBACK_ON_TIMEOUT, OPT_SECURE_FILE_PRIV, - OPT_KEEP_FILES_ON_CREATE + OPT_KEEP_FILES_ON_CREATE, + OPT_INNODB_ADAPTIVE_HASH_INDEX }; @@ -5057,6 +5058,12 @@ Disable with --skip-innodb-checksums.", "The common part for InnoDB table spaces.", (gptr*) &innobase_data_home_dir, (gptr*) &innobase_data_home_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"innodb_adaptive_hash_index", OPT_INNODB_ADAPTIVE_HASH_INDEX, + "Enable InnoDB adaptive hash index (enabled by default). " + "Disable with --skip-innodb-adaptive-hash-index.", + (gptr*) &innobase_adaptive_hash_index, + (gptr*) &innobase_adaptive_hash_index, + 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"innodb_doublewrite", OPT_INNODB_DOUBLEWRITE, "Enable InnoDB doublewrite buffer (enabled by default). \ Disable with --skip-innodb-doublewrite.", (gptr*) &innobase_use_doublewrite, (gptr*) &innobase_use_doublewrite, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, diff -Nrup a/sql/set_var.cc b/sql/set_var.cc --- a/sql/set_var.cc 2007-07-30 09:27:30 -06:00 +++ b/sql/set_var.cc 2007-10-02 23:47:26 -06:00 @@ -901,6 +901,7 @@ struct show_var_st init_vars[]= { {sys_innodb_concurrency_tickets.name, (char*) &sys_innodb_concurrency_tickets, SHOW_SYS}, {"innodb_data_file_path", (char*) &innobase_data_file_path, SHOW_CHAR_PTR}, {"innodb_data_home_dir", (char*) &innobase_data_home_dir, SHOW_CHAR_PTR}, + {"innodb_adaptive_hash_index", (char*) &innobase_adaptive_hash_index, SHOW_MY_BOOL}, {"innodb_doublewrite", (char*) &innobase_use_doublewrite, SHOW_MY_BOOL}, {sys_innodb_fast_shutdown.name,(char*) &sys_innodb_fast_shutdown, SHOW_SYS}, {"innodb_file_io_threads", (char*) &innobase_file_io_threads, SHOW_LONG },