packages: mysql/bug580324.patch (NEW), mysql/control_online_alter_index.pat...
arekm
arekm at pld-linux.org
Fri Jan 28 10:18:10 CET 2011
Author: arekm Date: Fri Jan 28 09:18:10 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- rel 0.5 (consider this to be test before rel 1); update percona patches; drop obsolete patches
---- Files affected:
packages/mysql:
bug580324.patch (NONE -> 1.1) (NEW), control_online_alter_index.patch (NONE -> 1.1) (NEW), error_pad.patch (NONE -> 1.1) (NEW), innodb_adaptive_hash_index_partitions.patch (NONE -> 1.1) (NEW), innodb_admin_command_base.patch (NONE -> 1.1) (NEW), innodb_buffer_pool_pages_i_s.patch (NONE -> 1.1) (NEW), innodb_buffer_pool_shm.patch (NONE -> 1.1) (NEW), innodb_deadlock_count.patch (NONE -> 1.1) (NEW), innodb_dict_size_limit.patch (NONE -> 1.1) (NEW), innodb_expand_import.patch (NONE -> 1.1) (NEW), innodb_extend_slow.patch (NONE -> 1.1) (NEW), innodb_extra_rseg.patch (NONE -> 1.1) (NEW), innodb_fast_checksum.patch (NONE -> 1.1) (NEW), innodb_files_extend.patch (NONE -> 1.1) (NEW), innodb_fix_misc.patch (NONE -> 1.1) (NEW), innodb_io_patches.patch (NONE -> 1.1) (NEW), innodb_lru_dump_restore.patch (NONE -> 1.1) (NEW), innodb_opt_lru_count.patch (NONE -> 1.1) (NEW), innodb_overwrite_relay_log_info.patch (NONE -> 1.1) (NEW), innodb_pass_corrupt_table.patch (NONE -> 1.1) (NEW), innodb_recovery_patches.patch (NONE -> 1.1) (NEW), innodb_separate_doublewrite.patch (NONE -> 1.1) (NEW), innodb_show_lock_name.patch (NONE -> 1.1) (NEW), innodb_show_status.patch (NONE -> 1.1) (NEW), innodb_show_status_extend.patch (NONE -> 1.1) (NEW), innodb_show_sys_tables.patch (NONE -> 1.1) (NEW), innodb_split_buf_pool_mutex.patch (NONE -> 1.1) (NEW), innodb_stats.patch (NONE -> 1.1) (NEW), innodb_thread_concurrency_timer_based.patch (NONE -> 1.1) (NEW), log_connection_error.patch (NONE -> 1.1) (NEW), log_warnings_silence.patch (NONE -> 1.1) (NEW), microsec_process.patch (NONE -> 1.1) (NEW), mysql-test.diff (NONE -> 1.1) (NEW), mysql_dump_ignore_ct.patch (NONE -> 1.1) (NEW), mysql_remove_eol_carret.patch (NONE -> 1.1) (NEW), mysql_syslog.patch (NONE -> 1.1) (NEW), optimizer_fix.patch (NONE -> 1.1) (NEW), percona_support.patch (NONE -> 1.1) (NEW), query_cache_enhance.patch (NONE -> 1.1) (NEW), remove_fcntl_excessive_calls.patch (NONE -> 1.1) (NEW), response_time_distribution.patch (NONE -> 1.1) (NEW), show_slave_status_nolock.patch (NONE -> 1.1) (NEW), show_temp.patch (NONE -> 1.1) (NEW), slow_extended.patch (NONE -> 1.1) (NEW), sql_no_fcache.patch (NONE -> 1.1) (NEW), userstat.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/mysql/bug580324.patch
diff -u /dev/null packages/mysql/bug580324.patch:1.1
--- /dev/null Fri Jan 28 10:18:10 2011
+++ packages/mysql/bug580324.patch Fri Jan 28 10:18:02 2011
@@ -0,0 +1,109 @@
+# name : bug580324.patch
+# introduced : 11 or before
+# maintainer : Oleg
+#
+#!!! notice !!!
+# Any small change to this file in the main branch
+# should be done or reviewed by the maintainer!
+diff -ruN a/sql/sql_base.cc b/sql/sql_base.cc
+--- a/sql/sql_base.cc 2011-01-11 21:35:26.000000000 +0300
++++ b/sql/sql_base.cc 2011-01-11 21:42:02.000000000 +0300
+@@ -251,8 +251,12 @@
+ const TABLE_LIST *table_list,
+ bool tmp_table)
+ {
+- uint key_length= (uint) (strmov(strmov(key, table_list->db)+1,
+- table_list->table_name)-key)+1;
++ char *db_end= strnmov(key, table_list->db, MAX_DBKEY_LENGTH - 2);
++ *db_end++= '\0';
++ char *table_end= strnmov(db_end, table_list->table_name,
++ key + MAX_DBKEY_LENGTH - 1 - db_end);
++ *table_end++= '\0';
++ uint key_length= (uint) (table_end-key);
+ if (tmp_table)
+ {
+ int4store(key + key_length, thd->server_id);
+diff -ruN a/sql/sql_parse.cc b/sql/sql_parse.cc
+--- a/sql/sql_parse.cc 2011-01-11 21:35:26.000000000 +0300
++++ b/sql/sql_parse.cc 2011-01-11 21:48:50.000000000 +0300
+@@ -1110,11 +1110,18 @@
+ break;
+ #else
+ {
+- char *fields, *packet_end= packet + packet_length, *arg_end;
++ char *fields;
++ char *packet_end= packet + packet_length;
++ char *wildcard;
+ /* Locked closure of all tables */
+ TABLE_LIST table_list;
++ char table_name_buff[NAME_LEN+1];
+ LEX_STRING table_name;
++ uint dummy_errors;
+ LEX_STRING db;
++
++ table_name.str= table_name_buff;
++ table_name.length= 0;
+ /*
+ SHOW statements should not add the used tables to the list of tables
+ used in a transaction.
+@@ -1127,24 +1134,23 @@
+ /*
+ We have name + wildcard in packet, separated by endzero
+ */
+- arg_end= strend(packet);
+- uint arg_length= arg_end - packet;
+-
+- /* Check given table name length. */
+- if (arg_length >= packet_length || arg_length > NAME_LEN)
++ wildcard= strend(packet);
++ table_name.length= wildcard - packet;
++ wildcard++;
++ uint query_length= (uint) (packet_end - wildcard); // Don't count end \0
++ if (table_name.length > NAME_LEN || query_length > NAME_LEN)
+ {
+ my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
+ break;
+ }
+- thd->convert_string(&table_name, system_charset_info,
+- packet, arg_length, thd->charset());
+- if (check_table_name(table_name.str, table_name.length, FALSE))
+- {
+- /* this is OK due to convert_string() null-terminating the string */
+- my_error(ER_WRONG_TABLE_NAME, MYF(0), table_name.str);
++ table_name.length= copy_and_convert(table_name.str,
++ sizeof(table_name_buff)-1,
++ system_charset_info,
++ packet, table_name.length,
++ thd->charset(), &dummy_errors);
++ table_name.str[table_name.length]= '\0';
++ if (!(fields= (char *) thd->memdup(wildcard, query_length + 1)))
+ break;
+- }
+- packet= arg_end + 1;
+ mysql_reset_thd_for_next_command(thd);
+ lex_start(thd);
+ /* Must be before we init the table list. */
+@@ -1169,9 +1175,6 @@
+ table_list.schema_table= schema_table;
+ }
+
+- uint query_length= (uint) (packet_end - packet); // Don't count end \0
+- if (!(fields= (char *) thd->memdup(packet, query_length + 1)))
+- break;
+ thd->set_query(fields, query_length);
+ general_log_print(thd, command, "%s %s", table_list.table_name, fields);
+
+diff -ruN a/strings/ctype-utf8.c b/strings/ctype-utf8.c
+--- a/strings/ctype-utf8.c 2010-12-03 20:58:26.000000000 +0300
++++ b/strings/ctype-utf8.c 2011-01-11 21:42:02.000000000 +0300
+@@ -4212,6 +4212,10 @@
+ {
+ int code;
+ char hex[]= "0123456789abcdef";
++
++ if (s >= e)
++ return MY_CS_TOOSMALL;
++
+ if (wc < 128 && filename_safe_char[wc])
+ {
+ *s= (uchar) wc;
================================================================
Index: packages/mysql/control_online_alter_index.patch
diff -u /dev/null packages/mysql/control_online_alter_index.patch:1.1
--- /dev/null Fri Jan 28 10:18:10 2011
+++ packages/mysql/control_online_alter_index.patch Fri Jan 28 10:18:02 2011
@@ -0,0 +1,90 @@
+# name : control_online_alter_index.patch
+# introduced : 12
+# maintainer : Yasufumi
+#
+#!!! notice !!!
+# Any small change to this file in the main branch
+# should be done or reviewed by the maintainer!
+diff -ruN a/sql/handler.h b/sql/handler.h
+--- a/sql/handler.h 2010-11-03 07:01:14.000000000 +0900
++++ b/sql/handler.h 2010-12-03 13:51:04.727293058 +0900
+@@ -194,6 +194,19 @@
+ #define HA_ONLINE_DROP_UNIQUE_INDEX (1L << 9) /*drop uniq. online*/
+ #define HA_ONLINE_ADD_PK_INDEX (1L << 10)/*add prim. online*/
+ #define HA_ONLINE_DROP_PK_INDEX (1L << 11)/*drop prim. online*/
++
++#define HA_ONLINE_ALTER_INDEX_MASK (HA_ONLINE_ADD_INDEX_NO_WRITES \
++ | HA_ONLINE_DROP_INDEX_NO_WRITES \
++ | HA_ONLINE_ADD_UNIQUE_INDEX_NO_WRITES \
++ | HA_ONLINE_DROP_UNIQUE_INDEX_NO_WRITES \
++ | HA_ONLINE_ADD_PK_INDEX_NO_WRITES \
++ | HA_ONLINE_DROP_PK_INDEX_NO_WRITES \
++ | HA_ONLINE_ADD_INDEX \
++ | HA_ONLINE_DROP_INDEX \
++ | HA_ONLINE_ADD_UNIQUE_INDEX \
++ | HA_ONLINE_DROP_UNIQUE_INDEX \
++ | HA_ONLINE_ADD_PK_INDEX \
++ | HA_ONLINE_DROP_PK_INDEX)
+ /*
+ HA_PARTITION_FUNCTION_SUPPORTED indicates that the function is
+ supported at all.
+diff -ruN a/sql/sql_class.h b/sql/sql_class.h
+--- a/sql/sql_class.h 2010-12-02 20:31:56.200956501 +0900
++++ b/sql/sql_class.h 2010-12-03 13:51:04.744953174 +0900
+@@ -481,6 +481,8 @@
+ my_bool engine_condition_pushdown;
+ my_bool keep_files_on_create;
+
++ my_bool online_alter_index;
++
+ my_bool old_alter_table;
+ my_bool old_passwords;
+ my_bool big_tables;
+diff -ruN a/sql/sql_partition.cc b/sql/sql_partition.cc
+--- a/sql/sql_partition.cc 2010-11-03 07:01:14.000000000 +0900
++++ b/sql/sql_partition.cc 2010-12-03 13:59:56.444039002 +0900
+@@ -4635,7 +4635,12 @@
+ alter_info->num_parts= curr_part_no - new_part_no;
+ }
+ }
+- if (!(flags= new_table->file->alter_table_flags(alter_info->flags)))
++ flags= new_table->file->alter_table_flags(alter_info->flags);
++ if (!thd->variables.online_alter_index)
++ {
++ flags&= ~((uint)HA_ONLINE_ALTER_INDEX_MASK);
++ }
++ if (!flags)
+ {
+ my_error(ER_PARTITION_FUNCTION_FAILURE, MYF(0));
+ goto err;
+diff -ruN a/sql/sql_table.cc b/sql/sql_table.cc
+--- a/sql/sql_table.cc 2010-11-03 07:01:14.000000000 +0900
++++ b/sql/sql_table.cc 2010-12-03 13:51:04.768955495 +0900
+@@ -6107,6 +6107,10 @@
+ uint *idx_end_p;
+
+ alter_flags= table->file->alter_table_flags(alter_info->flags);
++ if (!thd->variables.online_alter_index)
++ {
++ alter_flags&= ~((ulong)HA_ONLINE_ALTER_INDEX_MASK);
++ }
+ DBUG_PRINT("info", ("alter_flags: %lu", alter_flags));
+ /* Check dropped indexes. */
+ for (idx_p= index_drop_buffer, idx_end_p= idx_p + index_drop_count;
+diff -ruN a/sql/sys_vars.cc b/sql/sys_vars.cc
+--- a/sql/sys_vars.cc 2010-12-02 21:23:05.569356468 +0900
++++ b/sql/sys_vars.cc 2010-12-03 14:05:28.857356603 +0900
+@@ -2124,6 +2124,13 @@
+ GLOBAL_VAR(opt_optimizer_fix),
+ NO_CMD_LINE, DEFAULT(TRUE));
+
++static Sys_var_mybool Sys_fast_index_creation(
++ "fast_index_creation",
++ "If disabled, suppresses online operations for indexes of ALTER TABLE "
++ "(e.g. fast index creation of InnoDB Plugin) for the session.",
++ SESSION_VAR(online_alter_index), NO_CMD_LINE,
++ DEFAULT(TRUE));
++
+ /** propagates changes to the relevant flag of @@optimizer_switch */
+ static bool fix_engine_condition_pushdown(sys_var *self, THD *thd,
+ enum_var_type type)
================================================================
Index: packages/mysql/error_pad.patch
diff -u /dev/null packages/mysql/error_pad.patch:1.1
--- /dev/null Fri Jan 28 10:18:10 2011
+++ packages/mysql/error_pad.patch Fri Jan 28 10:18:02 2011
@@ -0,0 +1,267 @@
+# name : error_pad.patch
+# introduced : 12
+# maintainer : Oleg
+#
+#!!! notice !!!
+# Any small change to this file in the main branch
+# should be done or reviewed by the maintainer!
+diff -ruN a/extra/comp_err.c b/extra/comp_err.c
+--- a/extra/comp_err.c 2010-08-03 17:24:24.000000000 +0000
++++ b/extra/comp_err.c 2010-09-14 16:49:28.000000000 +0000
+@@ -30,11 +30,12 @@
+ #include <assert.h>
+ #include <my_dir.h>
+
+-#define MAX_ROWS 1000
++#define MAX_ROWS 5000
+ #define HEADER_LENGTH 32 /* Length of header in errmsg.sys */
+ #define DEFAULT_CHARSET_DIR "../sql/share/charsets"
+ #define ER_PREFIX "ER_"
+ #define WARN_PREFIX "WARN_"
++#define PADD_PREFIX "PADD_"
+ static char *OUTFILE= (char*) "errmsg.sys";
+ static char *HEADERFILE= (char*) "mysqld_error.h";
+ static char *NAMEFILE= (char*) "mysqld_ername.h";
+@@ -89,6 +90,7 @@
+ const char *sql_code1; /* sql state */
+ const char *sql_code2; /* ODBC state */
+ struct errors *next_error; /* Pointer to next error */
++ my_bool is_padding; /* If true - padd this er_name while er_code != d_code*/
+ DYNAMIC_ARRAY msg; /* All language texts for this error */
+ };
+
+@@ -127,6 +129,7 @@
+
+
+ static struct languages *parse_charset_string(char *str);
++static struct errors *parse_padd_string(char *ptr, int er_count);
+ static struct errors *parse_error_string(char *ptr, int er_count);
+ static struct message *parse_message_string(struct message *new_message,
+ char *str);
+@@ -252,6 +255,11 @@
+
+ for (tmp_error= error_head; tmp_error; tmp_error= tmp_error->next_error)
+ {
++ if (tmp_error->is_padding)
++ {
++ er_last= tmp_error->d_code;
++ continue;
++ }
+ /*
+ generating mysqld_error.h
+ fprintf() will automatically add \r on windows
+@@ -344,12 +352,29 @@
+ "language\n", tmp_error->er_name, tmp_lang->lang_short_name);
+ goto err;
+ }
+- if (copy_rows(to, tmp->text, row_nr, start_pos))
++ if (tmp_error->is_padding)
+ {
+- fprintf(stderr, "Failed to copy rows to %s\n", outfile);
+- goto err;
++ uint padd_to= tmp_error->d_code;
++ char* padd_message= tmp->text;
++ while ((row_nr+er_offset) < padd_to)
++ {
++ if (copy_rows(to, padd_message,row_nr,start_pos))
++ {
++ fprintf(stderr, "Failed to copy rows to %s\n", outfile);
++ goto err;
++ }
++ row_nr++;
++ }
++ }
++ else
++ {
++ if (copy_rows(to, tmp->text, row_nr, start_pos))
++ {
++ fprintf(stderr, "Failed to copy rows to %s\n", outfile);
++ goto err;
++ }
++ row_nr++;
+ }
+- row_nr++;
+ }
+
+ /* continue with header of the errmsg.sys file */
+@@ -500,14 +525,26 @@
+ DBUG_RETURN(0);
+ continue;
+ }
+- if (is_prefix(str, ER_PREFIX) || is_prefix(str, WARN_PREFIX))
++ if (is_prefix(str, ER_PREFIX) || is_prefix(str, WARN_PREFIX) || is_prefix(str, PADD_PREFIX))
+ {
+- if (!(current_error= parse_error_string(str, rcount)))
++ if (is_prefix(str, PADD_PREFIX))
+ {
+- fprintf(stderr, "Failed to parse the error name string\n");
+- DBUG_RETURN(0);
++ if (!(current_error= parse_padd_string(str, rcount)))
++ {
++ fprintf(stderr, "Failed to parse the error padd string\n");
++ DBUG_RETURN(0);
++ }
++ rcount= current_error->d_code - er_offset; /* Count number of unique errors */
++ }
++ else
++ {
++ if (!(current_error= parse_error_string(str, rcount)))
++ {
++ fprintf(stderr, "Failed to parse the error name string\n");
++ DBUG_RETURN(0);
++ }
++ rcount++; /* Count number of unique errors */
+ }
+- rcount++; /* Count number of unique errors */
+
+ /* add error to the list */
+ *tail_error= current_error;
+@@ -848,78 +885,122 @@
+ DBUG_RETURN(new_message);
+ }
+
++static struct errors* create_new_error(my_bool is_padding, char *er_name, int d_code, const char *sql_code1, const char *sql_code2)
++{
++ struct errors *new_error;
++ DBUG_ENTER("create_new_error");
++ /* create a new element */
++ new_error= (struct errors *) my_malloc(sizeof(*new_error), MYF(MY_WME));
++ if (my_init_dynamic_array(&new_error->msg, sizeof(struct message), 0, 0))
++ DBUG_RETURN(0); /* OOM: Fatal error */
++ new_error->is_padding= is_padding;
++ DBUG_PRINT("info", ("is_padding: %s", (is_padding ? "true" : "false")));
++ new_error->er_name= er_name;
++ DBUG_PRINT("info", ("er_name: %s", er_name));
++ new_error->d_code= d_code;
++ DBUG_PRINT("info", ("d_code: %d", d_code));
++ new_error->sql_code1= sql_code1;
++ DBUG_PRINT("info", ("sql_code1: %s", sql_code1));
++ new_error->sql_code2= sql_code2;
++ DBUG_PRINT("info", ("sql_code2: %s", sql_code2));
++ DBUG_RETURN(new_error);
++}
+
+ /*
+- Parsing the string with error name and codes; returns the pointer to
++ Parsing the string with padd syntax (name + error to pad); returns the pointer to
+ the errors struct
+ */
+
+-static struct errors *parse_error_string(char *str, int er_count)
++static struct errors *parse_padd_string(char* str, int er_count)
+ {
+- struct errors *new_error;
++ char *er_name;
++ uint d_code;
++ char *start;
+ DBUG_ENTER("parse_error_string");
+ DBUG_PRINT("enter", ("str: %s", str));
+
+- /* create a new element */
+- new_error= (struct errors *) my_malloc(sizeof(*new_error), MYF(MY_WME));
++ start= str;
++ str= skip_delimiters(str);
+
+- if (my_init_dynamic_array(&new_error->msg, sizeof(struct message), 0, 0))
++ /* getting the error name */
++
++ if (!(er_name= get_word(&str)))
+ DBUG_RETURN(0); /* OOM: Fatal error */
+
+- /* getting the error name */
+ str= skip_delimiters(str);
+
+- if (!(new_error->er_name= get_word(&str)))
++ if (!(d_code= parse_error_offset(start)))
++ {
++ fprintf(stderr, "Failed to parse the error padd string '%s' '%s' (d_code doesn't parse)!\n",er_name,str);
++ DBUG_RETURN(0);
++ }
++ if (d_code < (uint)(er_offset + er_count))
++ {
++ fprintf(stderr, "Error to padding less current error number!\n");
++ DBUG_RETURN(0);
++ }
++ DBUG_RETURN(create_new_error(TRUE,er_name,d_code,empty_string,empty_string));
++}
++
++/*
++ Parsing the string with error name and codes; returns the pointer to
++ the errors struct
++*/
++
++static struct errors *parse_error_string(char *str, int er_count)
++{
++ char *er_name;
++ int d_code;
++ const char *sql_code1= empty_string;
++ const char *sql_code2= empty_string;
++ DBUG_ENTER("parse_error_string");
++ DBUG_PRINT("enter", ("str: %s", str));
++
++ str= skip_delimiters(str);
++
++ /* getting the error name */
++
++ if (!(er_name= get_word(&str)))
+ DBUG_RETURN(0); /* OOM: Fatal error */
+- DBUG_PRINT("info", ("er_name: %s", new_error->er_name));
+
+ str= skip_delimiters(str);
+
+ /* getting the code1 */
+-
+- new_error->d_code= er_offset + er_count;
+- DBUG_PRINT("info", ("d_code: %d", new_error->d_code));
++ d_code= er_offset + er_count;
+
+ str= skip_delimiters(str);
+
+ /* if we reached EOL => no more codes, but this can happen */
+ if (!*str)
+ {
+- new_error->sql_code1= empty_string;
+- new_error->sql_code2= empty_string;
+ DBUG_PRINT("info", ("str: %s", str));
+- DBUG_RETURN(new_error);
++ goto complete_create;
+ }
+-
+ /* getting the sql_code 1 */
+-
+- if (!(new_error->sql_code1= get_word(&str)))
++ if (!(sql_code1= get_word(&str)))
+ DBUG_RETURN(0); /* OOM: Fatal error */
+- DBUG_PRINT("info", ("sql_code1: %s", new_error->sql_code1));
+
+ str= skip_delimiters(str);
+
+ /* if we reached EOL => no more codes, but this can happen */
+ if (!*str)
+ {
+- new_error->sql_code2= empty_string;
+ DBUG_PRINT("info", ("str: %s", str));
+- DBUG_RETURN(new_error);
++ goto complete_create;
+ }
+-
+ /* getting the sql_code 2 */
+- if (!(new_error->sql_code2= get_word(&str)))
++ if (!(sql_code2= get_word(&str)))
+ DBUG_RETURN(0); /* OOM: Fatal error */
+- DBUG_PRINT("info", ("sql_code2: %s", new_error->sql_code2));
+
+ str= skip_delimiters(str);
++
+ if (*str)
+ {
+ fprintf(stderr, "The error line did not end with sql/odbc code!");
+ DBUG_RETURN(0);
+ }
+-
+- DBUG_RETURN(new_error);
++complete_create:
++ DBUG_RETURN(create_new_error(FALSE,er_name,d_code,sql_code1,sql_code2));
+ }
+
+
================================================================
Index: packages/mysql/innodb_adaptive_hash_index_partitions.patch
diff -u /dev/null packages/mysql/innodb_adaptive_hash_index_partitions.patch:1.1
--- /dev/null Fri Jan 28 10:18:10 2011
+++ packages/mysql/innodb_adaptive_hash_index_partitions.patch Fri Jan 28 10:18:02 2011
@@ -0,0 +1,1508 @@
+# name : innodb_adaptive_hash_index_num.patch
+# introduced : XtraDB on 5.5 (-13?)
+# maintainer : Yasufumi
+#
+#!!! notice !!!
+# Any small change to this file in the main branch
+# should be done or reviewed by the maintainer!
+diff -ruN a/storage/innobase/btr/btr0btr.c b/storage/innobase/btr/btr0btr.c
+--- a/storage/innobase/btr/btr0btr.c 2010-12-04 15:52:23.355483176 +0900
++++ b/storage/innobase/btr/btr0btr.c 2010-12-04 16:12:48.639514256 +0900
+@@ -954,7 +954,7 @@
+ }
+ ut_a(block);
+
+- btr_search_drop_page_hash_index(block);
++ btr_search_drop_page_hash_index(block, NULL);
+
+ header = buf_block_get_frame(block) + PAGE_HEADER + PAGE_BTR_SEG_TOP;
+ #ifdef UNIV_BTR_DEBUG
+@@ -1023,7 +1023,7 @@
+
+ #ifndef UNIV_HOTBACKUP
+ if (UNIV_LIKELY(!recovery)) {
+- btr_search_drop_page_hash_index(block);
++ btr_search_drop_page_hash_index(block, index);
+ }
+
+ block->check_index_page_at_flush = TRUE;
+@@ -1188,7 +1188,7 @@
+ ut_a(!page_zip || page_zip_validate(page_zip, page));
+ #endif /* UNIV_ZIP_DEBUG */
+
+- btr_search_drop_page_hash_index(block);
++ btr_search_drop_page_hash_index(block, index);
+
+ /* Recreate the page: note that global data on page (possible
+ segment headers, next page-field, etc.) is preserved intact */
+@@ -2497,7 +2497,7 @@
+ mem_heap_free(heap);
+ }
+
+- btr_search_drop_page_hash_index(block);
++ btr_search_drop_page_hash_index(block, index);
+
+ /* Make the father empty */
+ btr_page_empty(father_block, father_page_zip, index, page_level, mtr);
+@@ -2720,7 +2720,7 @@
+ goto err_exit;
+ }
+
+- btr_search_drop_page_hash_index(block);
++ btr_search_drop_page_hash_index(block, index);
+
+ /* Remove the page from the level list */
+ btr_level_list_remove(space, zip_size, page, mtr);
+@@ -2761,7 +2761,7 @@
+ goto err_exit;
+ }
+
+- btr_search_drop_page_hash_index(block);
++ btr_search_drop_page_hash_index(block, index);
+
+ #ifdef UNIV_BTR_DEBUG
+ if (UNIV_LIKELY_NULL(merge_page_zip)) {
+@@ -2875,7 +2875,7 @@
+ ut_a(btr_page_get_next(page, mtr) == FIL_NULL);
+
+ ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
+- btr_search_drop_page_hash_index(block);
++ btr_search_drop_page_hash_index(block, index);
+
+ btr_page_get_father(index, block, mtr, &cursor);
+ father = btr_cur_get_block(&cursor);
+@@ -2980,7 +2980,7 @@
+
+ page = buf_block_get_frame(block);
+ ut_a(page_is_comp(merge_page) == page_is_comp(page));
+- btr_search_drop_page_hash_index(block);
++ btr_search_drop_page_hash_index(block, index);
+
+ if (left_page_no == FIL_NULL && !page_is_leaf(page)) {
+
+diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
+--- a/storage/innobase/btr/btr0cur.c 2010-12-04 15:52:23.359513820 +0900
++++ b/storage/innobase/btr/btr0cur.c 2010-12-04 16:12:48.643551837 +0900
+@@ -486,7 +486,7 @@
+ #ifdef UNIV_SEARCH_PERF_STAT
+ info->n_searches++;
+ #endif
+- if (rw_lock_get_writer(&btr_search_latch) == RW_LOCK_NOT_LOCKED
++ if (rw_lock_get_writer(btr_search_get_latch(cursor->index->id)) == RW_LOCK_NOT_LOCKED
+ && latch_mode <= BTR_MODIFY_LEAF
+ && info->last_hash_succ
+ && !estimate
+@@ -522,7 +522,7 @@
+
+ if (has_search_latch) {
+ /* Release possible search latch to obey latching order */
+- rw_lock_s_unlock(&btr_search_latch);
++ rw_lock_s_unlock(btr_search_get_latch(cursor->index->id));
+ }
+
+ /* Store the position of the tree latch we push to mtr so that we
+@@ -844,7 +844,7 @@
+
+ if (has_search_latch) {
+
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list