packages (MYSQL_5_1): mysql/mysql-bug677407.patch, mysql/mysql-error_pad.pa...

arekm arekm at pld-linux.org
Sat Feb 19 23:36:00 CET 2011


Author: arekm                        Date: Sat Feb 19 22:36:00 2011 GMT
Module: packages                      Tag: MYSQL_5_1
---- Log message:
- up to 5.1.11

---- Files affected:
packages/mysql:
   mysql-bug677407.patch (1.1.2.1 -> 1.1.2.2) , mysql-error_pad.patch (1.1.2.1 -> 1.1.2.2) , mysql-i_s_innodb_buffer_pool_pages.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_adjust_defaults.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_admin_command_base.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_deadlock_count.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_dict_size_limit.patch (1.2.2.1 -> 1.2.2.2) , mysql-innodb_expand_import.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_expand_undo_slots.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_extend_slow.patch (1.2 -> 1.2.2.1) , mysql-innodb_extra_rseg.patch (1.2.2.1 -> 1.2.2.2) , mysql-innodb_fast_checksum.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_files_extend.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_fix_misc.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_io_patches.patch (1.1.4.1 -> 1.1.4.2) , mysql-innodb_lru_dump_restore.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_overwrite_relay_log_info.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_pass_corrupt_table.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_purge_thread.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_recovery_patches.patch (1.1.4.1 -> 1.1.4.2) , mysql-innodb_separate_doublewrite.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_show_enhancements.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_show_lock_name.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_show_status.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_show_sys_tables.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_split_buf_pool_mutex.patch (1.3 -> 1.3.2.1) , mysql-innodb_stats.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_swap_builtin_plugin.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_thread_concurrency_timer_based.patch (1.2.2.1 -> 1.2.2.2) , mysql-microsec_process.patch (1.3 -> 1.3.2.1) , mysql-optimizer_fix.patch (1.1.2.1 -> 1.1.2.2) , mysql-profiling_slow.patch (1.2.2.1 -> 1.2.2.2) , mysql-query_cache_enhance.patch (1.1.2.1 -> 1.1.2.2) , mysql-show_patches.patch (1.1.4.1 -> 1.1.4.2) , mysql-show_temp_51.patch (1.1.2.1 -> 1.1.2.2) , mysql-slow_extended.patch (1.1.2.1 -> 1.1.2.2) , mysql-suppress_log_warning_1592.patch (1.1.2.1 -> 1.1.2.2) , mysql-userstat.patch (1.2 -> 1.2.2.1) , mysql.spec (1.496.2.4 -> 1.496.2.5) , plugin-avoid-version.patch (1.3 -> 1.3.2.1) 

---- Diffs:

================================================================
Index: packages/mysql/mysql-bug677407.patch
diff -u packages/mysql/mysql-bug677407.patch:1.1.2.1 packages/mysql/mysql-bug677407.patch:1.1.2.2
--- packages/mysql/mysql-bug677407.patch:1.1.2.1	Fri Dec 17 12:41:48 2010
+++ packages/mysql/mysql-bug677407.patch	Sat Feb 19 23:35:53 2011
@@ -49,6 +49,7 @@
 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+diff -ruN a/storage/innodb_plugin/trx/trx0i_s.c b/storage/innodb_plugin/trx/trx0i_s.c
 --- a/storage/innodb_plugin/trx/trx0i_s.c	2010-11-03 16:39:54.000000000 +0300
 +++ b/storage/innodb_plugin/trx/trx0i_s.c	2010-11-30 13:57:03.000000000 +0300
 @@ -157,10 +157,6 @@
@@ -62,7 +63,7 @@
  	i_s_table_cache_t innodb_trx;	/*!< innodb_trx table */
  	i_s_table_cache_t innodb_locks;	/*!< innodb_locks table */
  	i_s_table_cache_t innodb_lock_waits;/*!< innodb_lock_waits table */
-@@ -1101,13 +1097,6 @@
+@@ -1142,13 +1138,6 @@
  {
  	ullint	now;
  
@@ -76,7 +77,7 @@
  #ifdef UNIV_SYNC_DEBUG
  	ut_a(rw_lock_own(&cache->rw_lock, RW_LOCK_EX));
  #endif
-@@ -1205,6 +1194,12 @@
+@@ -1246,6 +1235,12 @@
  /*===================================*/
  	trx_i_s_cache_t*	cache)	/*!< in/out: cache */
  {
@@ -89,7 +90,7 @@
  	if (!can_cache_be_updated(cache)) {
  
  		return(1);
-@@ -1217,6 +1212,10 @@
+@@ -1258,6 +1253,10 @@
  
  	mutex_exit(&kernel_mutex);
  
@@ -100,7 +101,7 @@
  	return(0);
  }
  
-@@ -1247,16 +1246,12 @@
+@@ -1288,16 +1287,12 @@
  	release kernel_mutex
  	release trx_i_s_cache_t::rw_lock
  	acquire trx_i_s_cache_t::rw_lock, S
@@ -117,7 +118,7 @@
  	table_cache_init(&cache->innodb_trx, sizeof(i_s_trx_row_t));
  	table_cache_init(&cache->innodb_locks, sizeof(i_s_locks_row_t));
  	table_cache_init(&cache->innodb_lock_waits,
-@@ -1307,18 +1302,10 @@
+@@ -1348,18 +1343,10 @@
  /*===================*/
  	trx_i_s_cache_t*	cache)	/*!< in: cache */
  {

================================================================
Index: packages/mysql/mysql-error_pad.patch
diff -u packages/mysql/mysql-error_pad.patch:1.1.2.1 packages/mysql/mysql-error_pad.patch:1.1.2.2
--- packages/mysql/mysql-error_pad.patch:1.1.2.1	Fri Dec 17 12:41:48 2010
+++ packages/mysql/mysql-error_pad.patch	Sat Feb 19 23:35:53 2011
@@ -61,7 +61,7 @@
 -	goto err;
 +        int padd_to= tmp_error->d_code;
 +        char* padd_message= tmp->text;
-+        while ((row_nr+er_offset) < padd_to)
++        while ((int) row_nr + er_offset < padd_to)
 +        {
 +          if (copy_rows(to, padd_message,row_nr,start_pos))
 +          {
@@ -177,7 +177,7 @@
 +    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 < (er_offset + er_count))
++  if (d_code < (uint) er_offset + er_count)
 +  {
 +    fprintf(stderr, "Error to padding less current error number!\n");
 +    DBUG_RETURN(0);

================================================================
Index: packages/mysql/mysql-i_s_innodb_buffer_pool_pages.patch
diff -u packages/mysql/mysql-i_s_innodb_buffer_pool_pages.patch:1.1.2.1 packages/mysql/mysql-i_s_innodb_buffer_pool_pages.patch:1.1.2.2
--- packages/mysql/mysql-i_s_innodb_buffer_pool_pages.patch:1.1.2.1	Fri Dec 17 12:41:48 2010
+++ packages/mysql/mysql-i_s_innodb_buffer_pool_pages.patch	Sat Feb 19 23:35:53 2011
@@ -26,7 +26,7 @@
 diff -ruN a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc
 --- a/storage/innodb_plugin/handler/ha_innodb.cc	2010-04-29 15:55:25.000000000 +0900
 +++ b/storage/innodb_plugin/handler/ha_innodb.cc	2010-04-29 16:04:05.000000000 +0900
-@@ -11173,6 +11173,9 @@
+@@ -11175,6 +11175,9 @@
    innobase_system_variables, /* system variables */
    NULL /* reserved */
  },

================================================================
Index: packages/mysql/mysql-innodb_adjust_defaults.patch
diff -u packages/mysql/mysql-innodb_adjust_defaults.patch:1.1.2.1 packages/mysql/mysql-innodb_adjust_defaults.patch:1.1.2.2
--- packages/mysql/mysql-innodb_adjust_defaults.patch:1.1.2.1	Fri Dec 17 12:41:48 2010
+++ packages/mysql/mysql-innodb_adjust_defaults.patch	Sat Feb 19 23:35:53 2011
@@ -8,7 +8,7 @@
 diff -ruN a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc
 --- a/storage/innodb_plugin/handler/ha_innodb.cc	2010-04-30 16:39:14.000000000 +0900
 +++ b/storage/innodb_plugin/handler/ha_innodb.cc	2010-04-30 16:43:26.000000000 +0900
-@@ -11178,7 +11178,7 @@
+@@ -11223,7 +11223,7 @@
  static MYSQL_SYSVAR_ULONG(use_purge_thread, srv_use_purge_thread,
    PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
    "Number of purge devoted threads. #### over 1 is EXPERIMENTAL ####",
@@ -17,7 +17,7 @@
  
  static MYSQL_SYSVAR_BOOL(overwrite_relay_log_info, innobase_overwrite_relay_log_info,
    PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
-@@ -11278,7 +11278,7 @@
+@@ -11323,7 +11323,7 @@
  static MYSQL_SYSVAR_BOOL(adaptive_flushing, srv_adaptive_flushing,
    PLUGIN_VAR_NOCMDARG,
    "Attempt flushing dirty pages to avoid IO bursts at checkpoints.",
@@ -26,7 +26,7 @@
  
  static MYSQL_SYSVAR_ULONG(max_purge_lag, srv_max_purge_lag,
    PLUGIN_VAR_RQCMDARG,
-@@ -11523,7 +11523,7 @@
+@@ -11568,7 +11568,7 @@
  static MYSQL_SYSVAR_ULONG(ibuf_active_contract, srv_ibuf_active_contract,
    PLUGIN_VAR_RQCMDARG,
    "Enable/Disable active_contract of insert buffer. 0:disable 1:enable",
@@ -35,13 +35,13 @@
  
  static MYSQL_SYSVAR_ULONG(ibuf_accel_rate, srv_ibuf_accel_rate,
    PLUGIN_VAR_RQCMDARG,
-@@ -11601,8 +11601,8 @@
+@@ -11648,8 +11648,8 @@
  };
  static MYSQL_SYSVAR_ENUM(adaptive_checkpoint, srv_adaptive_checkpoint,
    PLUGIN_VAR_RQCMDARG,
--  "Enable/Disable flushing along modified age. ([none], reflex, estimate)",
+-  "Enable/Disable flushing along modified age. ([none], reflex, estimate, keep_average)",
 -  NULL, innodb_adaptive_checkpoint_update, 0, &adaptive_checkpoint_typelib);
-+  "Enable/Disable flushing along modified age. (none, reflex, [estimate])",
++  "Enable/Disable flushing along modified age. (none, reflex, [estimate], keep_average)",
 +  NULL, innodb_adaptive_checkpoint_update, 2, &adaptive_checkpoint_typelib);
  
  static MYSQL_SYSVAR_ULONG(enable_unsafe_group_commit, srv_enable_unsafe_group_commit,

================================================================
Index: packages/mysql/mysql-innodb_admin_command_base.patch
diff -u packages/mysql/mysql-innodb_admin_command_base.patch:1.1.2.1 packages/mysql/mysql-innodb_admin_command_base.patch:1.1.2.2
--- packages/mysql/mysql-innodb_admin_command_base.patch:1.1.2.1	Fri Dec 17 12:41:48 2010
+++ packages/mysql/mysql-innodb_admin_command_base.patch	Sat Feb 19 23:35:53 2011
@@ -8,7 +8,7 @@
 diff -ruN a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc
 --- a/storage/innodb_plugin/handler/ha_innodb.cc	2010-08-27 16:27:30.222410116 +0900
 +++ b/storage/innodb_plugin/handler/ha_innodb.cc	2010-08-27 16:27:44.073104773 +0900
-@@ -11532,6 +11532,7 @@
+@@ -11547,6 +11547,7 @@
  i_s_innodb_cmpmem_reset,
  i_s_innodb_table_stats,
  i_s_innodb_index_stats,
@@ -19,7 +19,7 @@
 diff -ruN a/storage/innodb_plugin/handler/i_s.cc b/storage/innodb_plugin/handler/i_s.cc
 --- a/storage/innodb_plugin/handler/i_s.cc	2010-08-27 16:22:04.261021936 +0900
 +++ b/storage/innodb_plugin/handler/i_s.cc	2010-08-27 16:27:44.077058655 +0900
-@@ -2948,3 +2948,139 @@
+@@ -2947,3 +2947,139 @@
  	STRUCT_FLD(system_vars, NULL),
  	STRUCT_FLD(__reserved1, NULL)
  };

================================================================
Index: packages/mysql/mysql-innodb_deadlock_count.patch
diff -u packages/mysql/mysql-innodb_deadlock_count.patch:1.1.2.1 packages/mysql/mysql-innodb_deadlock_count.patch:1.1.2.2
--- packages/mysql/mysql-innodb_deadlock_count.patch:1.1.2.1	Fri Dec 17 12:41:48 2010
+++ packages/mysql/mysql-innodb_deadlock_count.patch	Sat Feb 19 23:35:53 2011
@@ -8,7 +8,7 @@
 diff -ruN a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc
 --- a/storage/innodb_plugin/handler/ha_innodb.cc	2010-08-10 15:32:14.468241191 +0400
 +++ b/storage/innodb_plugin/handler/ha_innodb.cc	2010-08-10 15:32:14.926992081 +0400
-@@ -546,6 +546,8 @@
+@@ -547,6 +547,8 @@
    (char*) &export_vars.innodb_data_written,		  SHOW_LONG},
    {"dblwr_pages_written",
    (char*) &export_vars.innodb_dblwr_pages_written,	  SHOW_LONG},
@@ -53,7 +53,7 @@
 diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c
 --- a/storage/innodb_plugin/srv/srv0srv.c	2010-08-10 15:32:14.478241628 +0400
 +++ b/storage/innodb_plugin/srv/srv0srv.c	2010-08-10 15:32:14.936991959 +0400
-@@ -435,7 +435,7 @@
+@@ -438,7 +438,7 @@
  static ulint	srv_n_rows_updated_old		= 0;
  static ulint	srv_n_rows_deleted_old		= 0;
  static ulint	srv_n_rows_read_old		= 0;
@@ -62,7 +62,7 @@
  UNIV_INTERN ulint		srv_n_lock_wait_count		= 0;
  UNIV_INTERN ulint		srv_n_lock_wait_current_count	= 0;
  UNIV_INTERN ib_int64_t	srv_n_lock_wait_time		= 0;
-@@ -2146,6 +2146,8 @@
+@@ -2149,6 +2149,8 @@
  		= UT_LIST_GET_LEN(buf_pool->flush_list);
  	export_vars.innodb_buffer_pool_pages_free
  		= UT_LIST_GET_LEN(buf_pool->free);

================================================================
Index: packages/mysql/mysql-innodb_dict_size_limit.patch
diff -u packages/mysql/mysql-innodb_dict_size_limit.patch:1.2.2.1 packages/mysql/mysql-innodb_dict_size_limit.patch:1.2.2.2
--- packages/mysql/mysql-innodb_dict_size_limit.patch:1.2.2.1	Fri Dec 17 12:41:48 2010
+++ packages/mysql/mysql-innodb_dict_size_limit.patch	Sat Feb 19 23:35:53 2011
@@ -8,7 +8,7 @@
 diff -ruN a/storage/innodb_plugin/btr/btr0sea.c b/storage/innodb_plugin/btr/btr0sea.c
 --- a/storage/innodb_plugin/btr/btr0sea.c	2010-08-04 02:24:19.000000000 +0900
 +++ b/storage/innodb_plugin/btr/btr0sea.c	2010-08-27 16:09:42.926020757 +0900
-@@ -1173,6 +1173,126 @@
+@@ -1173,6 +1173,173 @@
  	mem_free(folds);
  }
  
@@ -20,7 +20,7 @@
 +/*=====================================*/
 +	dict_index_t*	index)		/* in: record descriptor */
 +{
-+	buf_page_t*	bpage;
++
 +	hash_table_t*	table;
 +	buf_block_t*	block;
 +	ulint		n_fields;
@@ -36,96 +36,143 @@
 +	ulint		i;
 +	mem_heap_t*	heap	= NULL;
 +	ulint*		offsets;
++	ibool		released_search_latch;
 +
-+	rw_lock_x_lock(&btr_search_latch);
-+	buf_pool_mutex_enter();
++	rw_lock_s_lock(&btr_search_latch);
 +
 +	table = btr_search_sys->hash_index;
 +
-+	bpage = UT_LIST_GET_LAST(buf_pool->LRU);
++	do {
++		buf_chunk_t*	chunks	= buf_pool->chunks;
++		buf_chunk_t*	chunk	= chunks + buf_pool->n_chunks;
++
++		released_search_latch = FALSE;
++
++		while (--chunk >= chunks) {
++			block	= chunk->blocks;
++			i	= chunk->size;
++
++retry:
++			for (; i--; block++) {
++				if (buf_block_get_state(block)
++				    != BUF_BLOCK_FILE_PAGE
++				    || block->index != index
++				    || !block->is_hashed) {
++					continue;
++				}
++
++				page = block->frame;
++
++				/* from btr_search_drop_page_hash_index() */
++				n_fields = block->curr_n_fields;
++				n_bytes = block->curr_n_bytes;
 +
-+	while (bpage != NULL) {
-+		block = (buf_block_t*) bpage;
-+		if (block->index == index && block->is_hashed) {
-+			page = block->frame;
 +
-+			/* from btr_search_drop_page_hash_index() */
-+			n_fields = block->curr_n_fields;
-+			n_bytes = block->curr_n_bytes;
++				/* keeping latch order */
++				rw_lock_s_unlock(&btr_search_latch);
++				released_search_latch = TRUE;
++				rw_lock_x_lock(&block->lock);
 +
-+			ut_a(n_fields + n_bytes > 0);
 +
-+			n_recs = page_get_n_recs(page);
++				ut_a(n_fields + n_bytes > 0);
 +
-+			/* Calculate and cache fold values into an array for fast deletion
-+			from the hash index */
++				n_recs = page_get_n_recs(page);
 +
-+			folds = mem_alloc(n_recs * sizeof(ulint));
++				/* Calculate and cache fold values into an array for fast deletion
++				from the hash index */
 +
-+			n_cached = 0;
++				folds = mem_alloc(n_recs * sizeof(ulint));
 +
-+			rec = page_get_infimum_rec(page);
-+			rec = page_rec_get_next_low(rec, page_is_comp(page));
++				n_cached = 0;
 +
-+			index_id = btr_page_get_index_id(page);
++				rec = page_get_infimum_rec(page);
++				rec = page_rec_get_next_low(rec, page_is_comp(page));
++
++				index_id = btr_page_get_index_id(page);
 +	
-+			ut_a(0 == ut_dulint_cmp(index_id, index->id));
++				ut_a(0 == ut_dulint_cmp(index_id, index->id));
 +
-+			prev_fold = 0;
++				prev_fold = 0;
 +
-+			offsets = NULL;
++				offsets = NULL;
 +
-+			while (!page_rec_is_supremum(rec)) {
-+				offsets = rec_get_offsets(rec, index, offsets,
-+							n_fields + (n_bytes > 0), &heap);
-+				ut_a(rec_offs_n_fields(offsets) == n_fields + (n_bytes > 0));
-+				fold = rec_fold(rec, offsets, n_fields, n_bytes, index_id);
++				while (!page_rec_is_supremum(rec)) {
++					offsets = rec_get_offsets(rec, index, offsets,
++								n_fields + (n_bytes > 0), &heap);
++					ut_a(rec_offs_n_fields(offsets) == n_fields + (n_bytes > 0));
++					fold = rec_fold(rec, offsets, n_fields, n_bytes, index_id);
 +
-+				if (fold == prev_fold && prev_fold != 0) {
++					if (fold == prev_fold && prev_fold != 0) {
 +
-+					goto next_rec;
-+				}
++						goto next_rec;
++					}
 +
-+				/* Remove all hash nodes pointing to this page from the
-+				hash chain */
++					/* Remove all hash nodes pointing to this page from the
++					hash chain */
 +
-+				folds[n_cached] = fold;
-+				n_cached++;
++					folds[n_cached] = fold;
++					n_cached++;
 +next_rec:
-+				rec = page_rec_get_next_low(rec, page_rec_is_comp(rec));
-+				prev_fold = fold;
-+			}
++					rec = page_rec_get_next_low(rec, page_rec_is_comp(rec));
++					prev_fold = fold;
++				}
 +
-+			for (i = 0; i < n_cached; i++) {
++				if (UNIV_LIKELY_NULL(heap)) {
++					mem_heap_empty(heap);
++				}
 +
-+				ha_remove_all_nodes_to_page(table, folds[i], page);
-+			}
++				rw_lock_x_lock(&btr_search_latch);
 +
-+			ut_a(index->search_info->ref_count > 0);
-+			index->search_info->ref_count--;
++				if (UNIV_UNLIKELY(!block->is_hashed)) {
++					goto cleanup;
++				}
 +
-+			block->is_hashed = FALSE;
-+			block->index = NULL;
-+	
++				ut_a(block->index == index);
++
++				if (UNIV_UNLIKELY(block->curr_n_fields != n_fields)
++				    || UNIV_UNLIKELY(block->curr_n_bytes != n_bytes)) {
++					rw_lock_x_unlock(&btr_search_latch);
++					rw_lock_x_unlock(&block->lock);
++
++					mem_free(folds);
++
++					rw_lock_s_lock(&btr_search_latch);
++					goto retry;
++				}
++
++				for (i = 0; i < n_cached; i++) {
++
++					ha_remove_all_nodes_to_page(table, folds[i], page);
++				}
++
++				ut_a(index->search_info->ref_count > 0);
++				index->search_info->ref_count--;
++
++				block->is_hashed = FALSE;
++				block->index = NULL;
++
++cleanup:	
 +#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
-+			if (UNIV_UNLIKELY(block->n_pointers)) {
-+				/* Corruption */
-+				ut_print_timestamp(stderr);
-+				fprintf(stderr,
++				if (UNIV_UNLIKELY(block->n_pointers)) {
++					/* Corruption */
++					ut_print_timestamp(stderr);
++					fprintf(stderr,
 +"  InnoDB: Corruption of adaptive hash index. After dropping\n"
 +"InnoDB: the hash index to a page of %s, still %lu hash nodes remain.\n",
-+					index->name, (ulong) block->n_pointers);
-+			}
++						index->name, (ulong) block->n_pointers);
++				}
 +#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
++				rw_lock_x_unlock(&btr_search_latch);
++				rw_lock_x_unlock(&block->lock);
 +
-+			mem_free(folds);
-+		}
++				mem_free(folds);
 +
-+		bpage = UT_LIST_GET_PREV(LRU, bpage);
-+	}
++				rw_lock_s_lock(&btr_search_latch);
++			}
++		}
++	} while (released_search_latch);
 +
-+	buf_pool_mutex_exit();
-+	rw_lock_x_unlock(&btr_search_latch);
++	rw_lock_s_unlock(&btr_search_latch);
 +
 +	if (UNIV_LIKELY_NULL(heap)) {
 +		mem_heap_free(heap);
@@ -198,7 +245,7 @@
 diff -ruN a/storage/innodb_plugin/dict/dict0dict.c b/storage/innodb_plugin/dict/dict0dict.c
 --- a/storage/innodb_plugin/dict/dict0dict.c	2010-08-04 02:24:19.000000000 +0900
 +++ b/storage/innodb_plugin/dict/dict0dict.c	2010-08-27 16:09:42.930057360 +0900
-@@ -582,6 +582,8 @@
+@@ -613,6 +613,8 @@
  
  	table = dict_table_get_on_id_low(table_id);
  
@@ -207,7 +254,7 @@
  	mutex_exit(&(dict_sys->mutex));
  
  	return(table);
-@@ -697,6 +699,8 @@
+@@ -728,6 +730,8 @@
  		table->n_mysql_handles_opened++;
  	}
  
@@ -216,7 +263,7 @@
  	mutex_exit(&(dict_sys->mutex));
  
  	if (table != NULL) {
-@@ -1211,6 +1215,64 @@
+@@ -1241,6 +1245,64 @@
  	dict_mem_table_free(table);
  }
  
@@ -281,7 +328,7 @@
  /****************************************************************//**
  If the given column name is reserved for InnoDB system columns, return
  TRUE.
-@@ -1673,6 +1735,11 @@
+@@ -1703,6 +1765,11 @@
  	ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
  	ut_ad(mutex_own(&(dict_sys->mutex)));
  
@@ -305,7 +352,7 @@
    {"have_atomic_builtins",
    (char*) &export_vars.innodb_have_atomic_builtins,	  SHOW_BOOL},
    {"log_waits",
-@@ -11308,6 +11310,11 @@
+@@ -11310,6 +11312,11 @@
    "Number of extra user rollback segments when create new database.",
    NULL, NULL, 0, 0, 126, 0);
  
@@ -317,7 +364,7 @@
  static struct st_mysql_sys_var* innobase_system_variables[]= {
    MYSQL_SYSVAR(additional_mem_pool_size),
    MYSQL_SYSVAR(autoextend_increment),
-@@ -11375,6 +11382,7 @@
+@@ -11377,6 +11384,7 @@
    MYSQL_SYSVAR(flush_log_at_trx_commit_session),
    MYSQL_SYSVAR(enable_unsafe_group_commit),
    MYSQL_SYSVAR(extra_rsegments),
@@ -366,7 +413,7 @@
 diff -ruN a/storage/innodb_plugin/include/dict0dict.h b/storage/innodb_plugin/include/dict0dict.h
 --- a/storage/innodb_plugin/include/dict0dict.h	2010-08-04 02:24:19.000000000 +0900
 +++ b/storage/innodb_plugin/include/dict0dict.h	2010-08-27 16:09:42.953188223 +0900
-@@ -1132,6 +1132,12 @@
+@@ -1131,6 +1131,12 @@
  /*====================================*/
  	dict_table_t*	table,	/*!< in: table */
  	const char*	name);	/*!< in: name of the index to find */

================================================================
Index: packages/mysql/mysql-innodb_expand_import.patch
diff -u packages/mysql/mysql-innodb_expand_import.patch:1.1.2.1 packages/mysql/mysql-innodb_expand_import.patch:1.1.2.2
--- packages/mysql/mysql-innodb_expand_import.patch:1.1.2.1	Fri Dec 17 12:41:48 2010
+++ packages/mysql/mysql-innodb_expand_import.patch	Sat Feb 19 23:35:53 2011
@@ -21,7 +21,7 @@
  #ifndef UNIV_HOTBACKUP
  # include "buf0lru.h"
  # include "ibuf0ibuf.h"
-@@ -2983,7 +2989,7 @@
+@@ -3029,7 +3035,7 @@
  	ut_a(!(flags & (~0UL << DICT_TF_BITS)));
  
  	file = os_file_create_simple_no_error_handling(
@@ -30,12 +30,12 @@
  	if (!success) {
  		/* The following call prints an error message */
  		os_file_get_last_error(TRUE);
-@@ -3030,6 +3036,464 @@
+@@ -3076,6 +3082,464 @@
  	space_id = fsp_header_get_space_id(page);
  	space_flags = fsp_header_get_flags(page);
  
-+	if (srv_expand_import
-+	    && (space_id != id || space_flags != (flags & ~(~0 << DICT_TF_BITS)))) {
++	if (srv_expand_import) {
++
 +		ibool		file_is_corrupt = FALSE;
 +		byte*		buf3;
 +		byte*		descr_page;
@@ -498,7 +498,22 @@
 diff -ruN a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc
 --- a/storage/innodb_plugin/handler/ha_innodb.cc	2010-04-29 16:54:08.000000000 +0900
 +++ b/storage/innodb_plugin/handler/ha_innodb.cc	2010-04-30 10:28:05.000000000 +0900
-@@ -11305,6 +11305,11 @@
+@@ -7106,6 +7106,14 @@
+ 		err = row_discard_tablespace_for_mysql(dict_table->name, trx);
+ 	} else {
+ 		err = row_import_tablespace_for_mysql(dict_table->name, trx);
++
++		/* in expanded import mode re-initialize auto_increment again */
++		if ((err == DB_SUCCESS) && srv_expand_import &&
++		    (table->found_next_number_field != NULL)) {
++			dict_table_autoinc_lock(dict_table);
++			innobase_initialize_autoinc();
++			dict_table_autoinc_unlock(dict_table);
++		}
+ 	}
+ 
+ 	err = convert_error_code_to_mysql(err, dict_table->flags, NULL);
+@@ -11307,6 +11315,11 @@
    "Enable/Disable unsafe group commit when support_xa=OFF and use with binlog or other XA storage engine.",
    NULL, NULL, 0, 0, 1, 0);
  
@@ -510,7 +525,7 @@
  static MYSQL_SYSVAR_ULONG(extra_rsegments, srv_extra_rsegments,
    PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
    "Number of extra user rollback segments when create new database.",
-@@ -11381,6 +11386,7 @@
+@@ -11383,6 +11396,7 @@
    MYSQL_SYSVAR(adaptive_checkpoint),
    MYSQL_SYSVAR(flush_log_at_trx_commit_session),
    MYSQL_SYSVAR(enable_unsafe_group_commit),

================================================================
Index: packages/mysql/mysql-innodb_expand_undo_slots.patch
diff -u packages/mysql/mysql-innodb_expand_undo_slots.patch:1.1.2.1 packages/mysql/mysql-innodb_expand_undo_slots.patch:1.1.2.2
--- packages/mysql/mysql-innodb_expand_undo_slots.patch:1.1.2.1	Fri Dec 17 12:41:48 2010
+++ packages/mysql/mysql-innodb_expand_undo_slots.patch	Sat Feb 19 23:35:53 2011
@@ -39,7 +39,7 @@
  static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
    PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
    "Enable InnoDB doublewrite buffer (enabled by default). "
-@@ -11095,6 +11105,7 @@
+@@ -11097,6 +11107,7 @@
    MYSQL_SYSVAR(data_file_path),
    MYSQL_SYSVAR(data_home_dir),
    MYSQL_SYSVAR(doublewrite),

================================================================
Index: packages/mysql/mysql-innodb_extend_slow.patch
diff -u packages/mysql/mysql-innodb_extend_slow.patch:1.2 packages/mysql/mysql-innodb_extend_slow.patch:1.2.2.1
--- packages/mysql/mysql-innodb_extend_slow.patch:1.2	Fri Dec 17 12:41:48 2010
+++ packages/mysql/mysql-innodb_extend_slow.patch	Sat Feb 19 23:35:53 2011
@@ -37,9 +37,9 @@
 +					block->page.offset, DPAH_SIZE << 3);
 +	block_hash_byte = block_hash >> 3;
 +	block_hash_offset = (byte) block_hash & 0x07;
-+	if (block_hash_byte < 0 || block_hash_byte >= DPAH_SIZE)
++	if (block_hash_byte >= DPAH_SIZE)
 +		fprintf(stderr, "!!! block_hash_byte = %lu  block_hash_offset = %d !!!\n", block_hash_byte, block_hash_offset);
-+	if (block_hash_offset < 0 || block_hash_offset > 7)
++	if (block_hash_offset > 7)
 +		fprintf(stderr, "!!! block_hash_byte = %lu  block_hash_offset = %d !!!\n", block_hash_byte, block_hash_offset);
 +	if ((trx->distinct_page_access_hash[block_hash_byte] & ((byte) 0x01 << block_hash_offset)) == 0)
 +		trx->distinct_page_access++;
@@ -337,7 +337,7 @@
 diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0fil.c
 --- a/storage/innodb_plugin/fil/fil0fil.c	2010-08-27 16:15:55.187400372 +0900
 +++ b/storage/innodb_plugin/fil/fil0fil.c	2010-08-27 16:30:47.346992376 +0900
-@@ -4325,7 +4325,7 @@
+@@ -4371,7 +4371,7 @@
  				 node->name, node->handle, buf,
  				 offset_low, offset_high,
  				 page_size * n_pages,
@@ -346,7 +346,7 @@
  #endif
  		if (success) {
  			node->size += n_pages;
-@@ -4652,7 +4652,7 @@
+@@ -4698,7 +4698,7 @@
  i/o on a tablespace which does not exist */
  UNIV_INTERN
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-bug677407.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-error_pad.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-i_s_innodb_buffer_pool_pages.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_adjust_defaults.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_admin_command_base.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_deadlock_count.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_dict_size_limit.patch?r1=1.2.2.1&r2=1.2.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_expand_import.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_expand_undo_slots.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_extend_slow.patch?r1=1.2&r2=1.2.2.1&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_extra_rseg.patch?r1=1.2.2.1&r2=1.2.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_fast_checksum.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_files_extend.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_fix_misc.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_io_patches.patch?r1=1.1.4.1&r2=1.1.4.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_lru_dump_restore.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_overwrite_relay_log_info.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_pass_corrupt_table.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_purge_thread.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_recovery_patches.patch?r1=1.1.4.1&r2=1.1.4.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_separate_doublewrite.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_show_enhancements.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_show_lock_name.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_show_status.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_show_sys_tables.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_split_buf_pool_mutex.patch?r1=1.3&r2=1.3.2.1&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_stats.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_swap_builtin_plugin.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-innodb_thread_concurrency_timer_based.patch?r1=1.2.2.1&r2=1.2.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-microsec_process.patch?r1=1.3&r2=1.3.2.1&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-optimizer_fix.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-profiling_slow.patch?r1=1.2.2.1&r2=1.2.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-query_cache_enhance.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-show_patches.patch?r1=1.1.4.1&r2=1.1.4.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-show_temp_51.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-slow_extended.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-suppress_log_warning_1592.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql-userstat.patch?r1=1.2&r2=1.2.2.1&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql.spec?r1=1.496.2.4&r2=1.496.2.5&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/plugin-avoid-version.patch?r1=1.3&r2=1.3.2.1&f=u



More information about the pld-cvs-commit mailing list