packages: mysql/group_commit.patch, mysql/innodb_adaptive_hash_index_partit...

arekm arekm at pld-linux.org
Fri Jan 20 20:04:27 CET 2012


Author: arekm                        Date: Fri Jan 20 19:04:27 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 2; percona patches updated

---- Files affected:
packages/mysql:
   group_commit.patch (1.2 -> 1.3) , innodb_adaptive_hash_index_partitions.patch (1.11 -> 1.12) , innodb_split_buf_pool_mutex.patch (1.10 -> 1.11) , mysql.spec (1.564 -> 1.565) 

---- Diffs:

================================================================
Index: packages/mysql/group_commit.patch
diff -u packages/mysql/group_commit.patch:1.2 packages/mysql/group_commit.patch:1.3
--- packages/mysql/group_commit.patch:1.2	Wed Jan 11 19:10:25 2012
+++ packages/mysql/group_commit.patch	Fri Jan 20 20:04:21 2012
@@ -1206,7 +1206,7 @@
 +  }
 +  else
 +  {
-+    *out_pos= NULL;
++    *out_pos= 0ULL;
 +    *out_file= NULL;
 +  }
 +}

================================================================
Index: packages/mysql/innodb_adaptive_hash_index_partitions.patch
diff -u packages/mysql/innodb_adaptive_hash_index_partitions.patch:1.11 packages/mysql/innodb_adaptive_hash_index_partitions.patch:1.12
--- packages/mysql/innodb_adaptive_hash_index_partitions.patch:1.11	Wed Jan 11 19:10:26 2012
+++ packages/mysql/innodb_adaptive_hash_index_partitions.patch	Fri Jan 20 20:04:21 2012
@@ -5,80 +5,6 @@
 #!!! notice !!!
 # Any small change to this file in the main branch
 # should be done or reviewed by the maintainer!
---- a/storage/innobase/btr/btr0btr.c
-+++ b/storage/innobase/btr/btr0btr.c
-@@ -1523,7 +1523,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
-@@ -1592,7 +1592,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;
-@@ -1760,7 +1760,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);
- 	btr_blob_dbg_remove(page, index, "btr_page_empty");
- 
- 	/* Recreate the page: note that global data on page (possible
-@@ -3093,7 +3093,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);
-@@ -3317,7 +3317,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, index, mtr);
-@@ -3358,7 +3358,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)) {
-@@ -3473,7 +3473,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);
-@@ -3578,7 +3578,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)) {
- 
 --- a/storage/innobase/btr/btr0cur.c
 +++ b/storage/innobase/btr/btr0cur.c
 @@ -500,7 +500,7 @@
@@ -436,31 +362,15 @@
  	}
  failure:
  	cursor->flag = BTR_CUR_HASH_FAIL;
-@@ -1032,10 +1063,11 @@
- void
- btr_search_drop_page_hash_index(
- /*============================*/
--	buf_block_t*	block)	/*!< in: block containing index page,
-+	buf_block_t*	block,	/*!< in: block containing index page,
- 				s- or x-latched, or an index page
- 				for which we know that
- 				block->buf_fix_count == 0 */
-+	dict_index_t*	index_in)
- {
- 	hash_table_t*		table;
- 	ulint			n_fields;
-@@ -1054,23 +1086,55 @@
+@@ -1053,24 +1084,49 @@
+ 	const dict_index_t*	index;
  	ulint*			offsets;
  
- #ifdef UNIV_SYNC_DEBUG
+-#ifdef UNIV_SYNC_DEBUG
 -	ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED));
 -	ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX));
-+	if (index_in) {
-+		ut_ad(!rw_lock_own(btr_search_get_latch(index_in->id), RW_LOCK_SHARED));
-+		ut_ad(!rw_lock_own(btr_search_get_latch(index_in->id), RW_LOCK_EX));
-+	}
- #endif /* UNIV_SYNC_DEBUG */
- 
+-#endif /* UNIV_SYNC_DEBUG */
+-
  retry:
 -	rw_lock_s_lock(&btr_search_latch);
 -	index = block->index;
@@ -512,7 +422,7 @@
  
  #ifdef UNIV_SYNC_DEBUG
  	ut_ad(rw_lock_own(&(block->lock), RW_LOCK_SHARED)
-@@ -1080,12 +1144,14 @@
+@@ -1080,12 +1136,14 @@
  
  	n_fields = block->curr_n_fields;
  	n_bytes = block->curr_n_bytes;
@@ -528,7 +438,7 @@
  
  	ut_a(n_fields + n_bytes > 0);
  
-@@ -1136,7 +1202,7 @@
+@@ -1136,7 +1194,7 @@
  		mem_heap_free(heap);
  	}
  
@@ -537,7 +447,7 @@
  
  	if (UNIV_UNLIKELY(!block->index)) {
  		/* Someone else has meanwhile dropped the hash index */
-@@ -1152,7 +1218,7 @@
+@@ -1152,7 +1210,7 @@
  		/* Someone else has meanwhile built a new hash index on the
  		page, with different parameters */
  
@@ -546,7 +456,7 @@
  
  		mem_free(folds);
  		goto retry;
-@@ -1167,6 +1233,7 @@
+@@ -1167,6 +1225,7 @@
  	index->search_info->ref_count--;
  
  	block->index = NULL;
@@ -554,7 +464,7 @@
  
  cleanup:
  #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
-@@ -1179,14 +1246,14 @@
+@@ -1179,14 +1238,14 @@
  			"InnoDB: the hash index to a page of %s,"
  			" still %lu hash nodes remain.\n",
  			index->name, (ulong) block->n_pointers);
@@ -572,7 +482,7 @@
  #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
  
  	mem_free(folds);
-@@ -1218,9 +1285,9 @@
+@@ -1218,9 +1277,9 @@
  	ulint*		offsets;
  	ibool		released_search_latch;
  
@@ -584,7 +494,7 @@
  
  	for (j = 0; j < srv_buf_pool_instances; j++) {
  		buf_pool_t*	buf_pool;
-@@ -1254,7 +1321,7 @@
+@@ -1254,7 +1313,7 @@
  
  
  					/* keeping latch order */
@@ -593,7 +503,7 @@
  					released_search_latch = TRUE;
  					rw_lock_x_lock(&block->lock);
  
-@@ -1306,7 +1373,7 @@
+@@ -1306,7 +1365,7 @@
  						mem_heap_empty(heap);
  					}
  
@@ -602,7 +512,7 @@
  
  					if (UNIV_UNLIKELY(!block->index)) {
  						goto cleanup;
-@@ -1316,12 +1383,12 @@
+@@ -1316,12 +1375,12 @@
  
  					if (UNIV_UNLIKELY(block->curr_n_fields != n_fields)
  					    || UNIV_UNLIKELY(block->curr_n_bytes != n_bytes)) {
@@ -617,7 +527,7 @@
  						goto retry;
  					}
  
-@@ -1334,6 +1401,7 @@
+@@ -1334,6 +1393,7 @@
  					index->search_info->ref_count--;
  
  					block->index = NULL;
@@ -625,7 +535,7 @@
  
  cleanup:
  #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
-@@ -1346,18 +1414,18 @@
+@@ -1346,18 +1406,18 @@
  							index->name, (ulong) block->n_pointers);
  					}
  #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
@@ -647,16 +557,7 @@
  
  	if (UNIV_LIKELY_NULL(heap)) {
  		mem_heap_free(heap);
-@@ -1395,7 +1463,7 @@
- 
- 		buf_block_dbg_add_level(block, SYNC_TREE_NODE_FROM_HASH);
- 
--		btr_search_drop_page_hash_index(block);
-+		btr_search_drop_page_hash_index(block, NULL);
- 	}
- 
- 	mtr_commit(&mtr);
-@@ -1436,31 +1504,26 @@
+@@ -1436,31 +1496,26 @@
  	ut_ad(index);
  	ut_a(!dict_index_is_ibuf(index));
  
@@ -690,15 +591,14 @@
 -		rw_lock_s_unlock(&btr_search_latch);
 +		rw_lock_s_unlock(btr_search_get_latch(index->id));
  
--		btr_search_drop_page_hash_index(block);
-+		btr_search_drop_page_hash_index(block, index);
+ 		btr_search_drop_page_hash_index(block);
  	} else {
 -		rw_lock_s_unlock(&btr_search_latch);
 +		rw_lock_s_unlock(btr_search_get_latch(index->id));
  	}
  
  	n_recs = page_get_n_recs(page);
-@@ -1554,9 +1617,9 @@
+@@ -1554,9 +1609,9 @@
  		fold = next_fold;
  	}
  
@@ -710,7 +610,7 @@
  
  	if (UNIV_UNLIKELY(!btr_search_enabled)) {
  		goto exit_func;
-@@ -1583,6 +1646,7 @@
+@@ -1583,6 +1638,7 @@
  	block->curr_n_bytes = n_bytes;
  	block->curr_left_side = left_side;
  	block->index = index;
@@ -718,7 +618,7 @@
  
  	for (i = 0; i < n_cached; i++) {
  
-@@ -1590,7 +1654,7 @@
+@@ -1590,7 +1646,7 @@
  	}
  
  exit_func:
@@ -727,7 +627,7 @@
  
  	mem_free(folds);
  	mem_free(recs);
-@@ -1625,7 +1689,7 @@
+@@ -1625,7 +1681,7 @@
  	ut_ad(rw_lock_own(&(new_block->lock), RW_LOCK_EX));
  #endif /* UNIV_SYNC_DEBUG */
  
@@ -736,19 +636,16 @@
  
  	ut_a(!new_block->index || new_block->index == index);
  	ut_a(!block->index || block->index == index);
-@@ -1634,9 +1698,9 @@
+@@ -1634,7 +1690,7 @@
  
  	if (new_block->index) {
  
 -		rw_lock_s_unlock(&btr_search_latch);
 +		rw_lock_s_unlock(btr_search_get_latch(index->id));
  
--		btr_search_drop_page_hash_index(block);
-+		btr_search_drop_page_hash_index(block, index);
+ 		btr_search_drop_page_hash_index(block);
  
- 		return;
- 	}
-@@ -1651,7 +1715,7 @@
+@@ -1651,7 +1707,7 @@
  		new_block->n_bytes = block->curr_n_bytes;
  		new_block->left_side = left_side;
  
@@ -757,7 +654,7 @@
  
  		ut_a(n_fields + n_bytes > 0);
  
-@@ -1663,7 +1727,7 @@
+@@ -1663,7 +1719,7 @@
  		return;
  	}
  
@@ -766,7 +663,7 @@
  }
  
  /********************************************************************//**
-@@ -1702,7 +1766,7 @@
+@@ -1702,7 +1758,7 @@
  	ut_a(block->curr_n_fields + block->curr_n_bytes > 0);
  	ut_a(!dict_index_is_ibuf(index));
  
@@ -775,7 +672,7 @@
  
  	rec = btr_cur_get_rec(cursor);
  
-@@ -1713,7 +1777,7 @@
+@@ -1713,7 +1769,7 @@
  		mem_heap_free(heap);
  	}
  
@@ -784,7 +681,7 @@
  
  	if (block->index) {
  		ut_a(block->index == index);
-@@ -1721,7 +1785,7 @@
+@@ -1721,7 +1777,7 @@
  		ha_search_and_delete_if_found(table, fold, rec);
  	}
  
@@ -793,7 +690,7 @@
  }
  
  /********************************************************************//**
-@@ -1758,7 +1822,7 @@
+@@ -1758,7 +1814,7 @@
  	ut_a(cursor->index == index);
  	ut_a(!dict_index_is_ibuf(index));
  
@@ -802,7 +699,7 @@
  
  	if (!block->index) {
  
-@@ -1772,15 +1836,15 @@
+@@ -1772,15 +1828,15 @@
  	    && (cursor->n_bytes == block->curr_n_bytes)
  	    && !block->curr_left_side) {
  
@@ -821,7 +718,7 @@
  
  		btr_search_update_hash_on_insert(cursor);
  	}
-@@ -1815,9 +1879,9 @@
+@@ -1815,9 +1871,9 @@
  	ulint*		offsets		= offsets_;
  	rec_offs_init(offsets_);
  
@@ -833,7 +730,7 @@
  
  	rec = btr_cur_get_rec(cursor);
  
-@@ -1862,7 +1926,7 @@
+@@ -1862,7 +1918,7 @@
  	} else {
  		if (left_side) {
  
@@ -842,7 +739,7 @@
  
  			locked = TRUE;
  
-@@ -1880,7 +1944,7 @@
+@@ -1880,7 +1936,7 @@
  
  		if (!locked) {
  
@@ -851,7 +748,7 @@
  
  			locked = TRUE;
  
-@@ -1902,7 +1966,7 @@
+@@ -1902,7 +1958,7 @@
  		if (!left_side) {
  
  			if (!locked) {
@@ -860,7 +757,7 @@
  
  				locked = TRUE;
  
-@@ -1921,7 +1985,7 @@
+@@ -1921,7 +1977,7 @@
  
  		if (!locked) {
  
@@ -869,7 +766,7 @@
  
  			locked = TRUE;
  
-@@ -1948,7 +2012,7 @@
+@@ -1948,7 +2004,7 @@
  		mem_heap_free(heap);
  	}
  	if (locked) {
@@ -878,7 +775,7 @@
  	}
  }
  
-@@ -1964,7 +2028,7 @@
+@@ -1964,7 +2020,7 @@
  	ha_node_t*	node;
  	ulint		n_page_dumps	= 0;
  	ibool		ok		= TRUE;
@@ -887,7 +784,7 @@
  	ulint		cell_count;
  	mem_heap_t*	heap		= NULL;
  	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-@@ -1976,23 +2040,25 @@
+@@ -1976,23 +2032,25 @@
  
  	rec_offs_init(offsets_);
  
@@ -918,7 +815,7 @@
  
  		for (; node != NULL; node = node->next) {
  			const buf_block_t*	block
-@@ -2099,19 +2165,21 @@
+@@ -2099,19 +2157,21 @@
  		give other queries a chance to run. */
  		if (i != 0) {
  			buf_pool_page_hash_x_unlock_all();
@@ -994,8 +891,7 @@
 +				btr_search_s_unlock_all();
  
  				rw_lock_x_lock(&block->lock);
--				btr_search_drop_page_hash_index(block);
-+				btr_search_drop_page_hash_index(block, NULL);
+ 				btr_search_drop_page_hash_index(block);
  				rw_lock_x_unlock(&block->lock);
  
 -				rw_lock_s_lock(&btr_search_latch);
@@ -1007,15 +903,6 @@
  	}
  }
  
-@@ -1744,7 +1744,7 @@
- 
- 		UNIV_MEM_VALID(((buf_block_t*) bpage)->frame,
- 			       UNIV_PAGE_SIZE);
--		btr_search_drop_page_hash_index((buf_block_t*) bpage);
-+		btr_search_drop_page_hash_index((buf_block_t*) bpage, NULL);
- 		UNIV_MEM_INVALID(((buf_block_t*) bpage)->frame,
- 				 UNIV_PAGE_SIZE);
- 
 --- a/storage/innobase/dict/dict0dict.c
 +++ b/storage/innobase/dict/dict0dict.c
 @@ -1846,7 +1846,7 @@
@@ -1041,7 +928,7 @@
  static MYSQL_SYSVAR_ULONG(replication_delay, srv_replication_delay,
    PLUGIN_VAR_RQCMDARG,
    "Replication thread delay (ms) on the slave server if "
-@@ -12213,6 +12218,7 @@
+@@ -12253,6 +12258,7 @@
    MYSQL_SYSVAR(use_sys_stats_table),
    MYSQL_SYSVAR(stats_sample_pages),
    MYSQL_SYSVAR(adaptive_hash_index),
@@ -1061,20 +948,7 @@
  /*********************************************************************//**
  Updates the search info. */
  UNIV_INLINE
-@@ -136,10 +137,11 @@
- void
- btr_search_drop_page_hash_index(
- /*============================*/
--	buf_block_t*	block);	/*!< in: block containing index page,
-+	buf_block_t*	block,	/*!< in: block containing index page,
- 				s- or x-latched, or an index page
- 				for which we know that
- 				block->buf_fix_count == 0 */
-+	dict_index_t*	index_in);
- /************************************************************************
- Drops a page hash index based on index */
- UNIV_INTERN
-@@ -199,6 +201,40 @@
+@@ -199,6 +200,40 @@
  # define btr_search_validate()	TRUE
  #endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */
  
@@ -1115,7 +989,7 @@
  /** The search info struct in an index */
  struct btr_search_struct{
  	ulint	ref_count;	/*!< Number of blocks in this index tree
-@@ -259,7 +295,7 @@
+@@ -259,7 +294,7 @@
  
  /** The hash index system */
  struct btr_search_sys_struct{
@@ -1210,17 +1084,6 @@
 +	}
 +}
 +
---- a/storage/innobase/page/page0zip.c
-+++ b/storage/innobase/page/page0zip.c
-@@ -4456,7 +4456,7 @@
- 
- #ifndef UNIV_HOTBACKUP
- 	temp_block = buf_block_alloc(buf_pool);
--	btr_search_drop_page_hash_index(block);
-+	btr_search_drop_page_hash_index(block, index);
- 	block->check_index_page_at_flush = TRUE;
- #else /* !UNIV_HOTBACKUP */
- 	ut_ad(block == back_block1);
 --- a/storage/innobase/row/row0mysql.c
 +++ b/storage/innobase/row/row0mysql.c
 @@ -2594,7 +2594,7 @@
@@ -1402,7 +1265,7 @@
  
 --- a/storage/innobase/srv/srv0srv.c
 +++ b/storage/innobase/srv/srv0srv.c
-@@ -2051,7 +2051,9 @@
+@@ -2054,7 +2054,9 @@
  	      "-------------------------------------\n", file);
  	ibuf_print(file);
  
@@ -1413,7 +1276,7 @@
  
  	fprintf(file,
  		"%.2f hash searches/s, %.2f non-hash searches/s\n",
-@@ -2076,14 +2078,15 @@
+@@ -2079,14 +2081,15 @@
  			ut_total_allocated_memory,
  			mem_pool_get_reserved(mem_comm_pool));
  	/* Calcurate reserved memories */
@@ -1433,7 +1296,7 @@
  
  	lock_sys_subtotal = 0;
  	if (trx_sys) {
-@@ -2109,10 +2112,10 @@
+@@ -2112,10 +2115,10 @@
  			"    Recovery system     %lu \t(%lu + %lu)\n",
  
  			(ulong) (btr_search_sys

================================================================
Index: packages/mysql/innodb_split_buf_pool_mutex.patch
diff -u packages/mysql/innodb_split_buf_pool_mutex.patch:1.10 packages/mysql/innodb_split_buf_pool_mutex.patch:1.11
--- packages/mysql/innodb_split_buf_pool_mutex.patch:1.10	Wed Jan 11 19:10:26 2012
+++ packages/mysql/innodb_split_buf_pool_mutex.patch	Fri Jan 20 20:04:21 2012
@@ -551,12 +551,12 @@
  
 +	rw_lock_x_lock(&buf_pool->page_hash_latch);
  	bpage = buf_page_hash_get_low(buf_pool, space, offset, fold);
-+	if (bpage) {
-+		block_mutex = buf_page_get_mutex_enter(bpage);
-+		ut_a(block_mutex);
-+	}
  
  	if (UNIV_LIKELY_NULL(bpage)) {
++
++		block_mutex = buf_page_get_mutex_enter(bpage);
++		ut_a(block_mutex);
++
  		if (!buf_pool_watch_is_sentinel(buf_pool, bpage)) {
  			/* The page was loaded meanwhile. */
 +			rw_lock_x_unlock(&buf_pool->page_hash_latch);
@@ -1871,7 +1871,7 @@
  	ut_ad(buf_flush_ready_for_flush(bpage, flush_type));
  
  	buf_page_set_io_fix(bpage, BUF_IO_WRITE);
-@@ -1457,14 +1467,16 @@
+@@ -1455,14 +1465,16 @@
  
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/group_commit.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_adaptive_hash_index_partitions.patch?r1=1.11&r2=1.12&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_split_buf_pool_mutex.patch?r1=1.10&r2=1.11&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql.spec?r1=1.564&r2=1.565&f=u



More information about the pld-cvs-commit mailing list