[packages/percona-server/v5.1.x: 8/21] - update percona patches

glen glen at pld-linux.org
Wed Oct 21 16:08:49 CEST 2015


commit 967eb3b7d3f7f7fe477e3ea0fef271a38641dce2
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Sat Mar 12 14:52:45 2011 +0000

    - update percona patches
    
    Changed files:
        mysql-innodb_buffer_pool_shm.patch -> 1.1.2.2
        mysql-innodb_expand_import.patch -> 1.1.2.3
        mysql-innodb_fast_checksum.patch -> 1.1.2.3
        mysql-innodb_files_extend.patch -> 1.1.2.3
        mysql-innodb_fix_misc.patch -> 1.1.2.4
        mysql-innodb_lru_dump_restore.patch -> 1.1.2.3
        mysql-innodb_pass_corrupt_table.patch -> 1.1.2.3
        mysql-innodb_separate_doublewrite.patch -> 1.1.2.3

 mysql-innodb_buffer_pool_shm.patch      | 28 +++++++++++++++++-----------
 mysql-innodb_expand_import.patch        | 10 ++++++----
 mysql-innodb_fast_checksum.patch        |  6 +++---
 mysql-innodb_files_extend.patch         |  6 +++---
 mysql-innodb_fix_misc.patch             | 20 ++++++++++----------
 mysql-innodb_lru_dump_restore.patch     |  2 +-
 mysql-innodb_pass_corrupt_table.patch   |  8 ++++----
 mysql-innodb_separate_doublewrite.patch | 10 +++++-----
 8 files changed, 49 insertions(+), 41 deletions(-)
---
diff --git a/mysql-innodb_buffer_pool_shm.patch b/mysql-innodb_buffer_pool_shm.patch
index be6d0f2..ca55d71 100644
--- a/mysql-innodb_buffer_pool_shm.patch
+++ b/mysql-innodb_buffer_pool_shm.patch
@@ -96,7 +96,7 @@ diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0
  /********************************************************************//**
  Allocates a chunk of buffer frames.
  @return	chunk, or NULL on failure */
-@@ -768,26 +835,188 @@
+@@ -768,26 +835,190 @@
  {
  	buf_block_t*	block;
  	byte*		frame;
@@ -104,11 +104,13 @@ diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0
 +	ulint		zip_hash_mem_size = 0;
 +	hash_table_t*	zip_hash_tmp = NULL;
  	ulint		i;
++	ulint		size_target;
 +	buf_shm_info_t*	shm_info = NULL;
  
  	/* Round down to a multiple of page size,
  	although it already should be. */
  	mem_size = ut_2pow_round(mem_size, UNIV_PAGE_SIZE);
++	size_target = (mem_size / UNIV_PAGE_SIZE) - 1;
 +
 +	srv_buffer_pool_shm_is_reused = FALSE;
 +
@@ -285,7 +287,7 @@ diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0
  
  	/* Align a pointer to the first frame.  Note that when
  	os_large_page_size is smaller than UNIV_PAGE_SIZE,
-@@ -795,8 +1024,13 @@
+@@ -795,8 +1026,13 @@
  	it is bigger, we may allocate more blocks than requested. */
  
  	frame = ut_align(chunk->mem, UNIV_PAGE_SIZE);
@@ -299,10 +301,14 @@ diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0
  
  	/* Subtract the space needed for block descriptors. */
  	{
-@@ -810,6 +1044,98 @@
+@@ -810,6 +1046,102 @@
  		chunk->size = size;
  	}
  
++	if (chunk->size > size_target) {
++		chunk->size = size_target;
++	}
++
 +	if (shm_info && !(shm_info->is_new)) {
 +		/* convert the shared memory segment for reuse */
 +		ptrdiff_t	phys_offset;
@@ -398,7 +404,7 @@ diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0
  	/* Init block structs and assign frames for them. Then we
  	assign the frames to the first blocks (we already mapped the
  	memory above). */
-@@ -833,6 +1159,11 @@
+@@ -833,6 +1165,11 @@
  		block++;
  		frame += UNIV_PAGE_SIZE;
  	}
@@ -410,7 +416,7 @@ diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0
  
  	return(chunk);
  }
-@@ -1014,6 +1345,8 @@
+@@ -1014,6 +1351,8 @@
  		UNIV_MEM_UNDESC(block);
  	}
  
@@ -419,7 +425,7 @@ diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0
  	os_mem_free_large(chunk->mem, chunk->mem_size);
  }
  
-@@ -1063,7 +1396,10 @@
+@@ -1063,7 +1402,10 @@
  	srv_buf_pool_curr_size = buf_pool->curr_size * UNIV_PAGE_SIZE;
  
  	buf_pool->page_hash = hash_create(2 * buf_pool->curr_size);
@@ -430,7 +436,7 @@ diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0
  
  	buf_pool->last_printout_time = time(NULL);
  
-@@ -1078,6 +1414,86 @@
+@@ -1078,6 +1420,86 @@
  	--------------------------- */
  	/* All fields are initialized by mem_zalloc(). */
  
@@ -517,7 +523,7 @@ diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0
  	mutex_exit(&LRU_list_mutex);
  	rw_lock_x_unlock(&page_hash_latch);
  	buf_pool_mutex_exit();
-@@ -1102,6 +1518,34 @@
+@@ -1102,6 +1524,34 @@
  	buf_chunk_t*	chunk;
  	buf_chunk_t*	chunks;
  
@@ -552,7 +558,7 @@ diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0
  	chunks = buf_pool->chunks;
  	chunk = chunks + buf_pool->n_chunks;
  
-@@ -1110,10 +1554,13 @@
+@@ -1110,10 +1560,13 @@
  		would fail at shutdown. */
  		os_mem_free_large(chunk->mem, chunk->mem_size);
  	}
@@ -566,7 +572,7 @@ diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0
  	mem_free(buf_pool);
  	buf_pool = NULL;
  }
-@@ -1308,6 +1755,11 @@
+@@ -1308,6 +1761,11 @@
  	//buf_pool_mutex_enter();
  	mutex_enter(&LRU_list_mutex);
  
@@ -578,7 +584,7 @@ diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0
  shrink_again:
  	if (buf_pool->n_chunks <= 1) {
  
-@@ -1551,6 +2003,11 @@
+@@ -1551,6 +2009,11 @@
  buf_pool_resize(void)
  /*=================*/
  {
diff --git a/mysql-innodb_expand_import.patch b/mysql-innodb_expand_import.patch
index ec08929..bec7eef 100644
--- a/mysql-innodb_expand_import.patch
+++ b/mysql-innodb_expand_import.patch
@@ -30,7 +30,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  	if (!success) {
  		/* The following call prints an error message */
  		os_file_get_last_error(TRUE);
-@@ -3076,6 +3082,464 @@
+@@ -3076,6 +3082,466 @@
  	space_id = fsp_header_get_space_id(page);
  	space_flags = fsp_header_get_flags(page);
  
@@ -104,8 +104,10 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
 +
 +		if (size_bytes < free_limit_bytes) {
 +			free_limit_bytes = size_bytes;
-+			fprintf(stderr, "InnoDB: free limit of %s is larger than its real size.\n", filepath);
-+			file_is_corrupt = TRUE;
++			if (size_bytes >= FSP_EXTENT_SIZE * UNIV_PAGE_SIZE) {
++				fprintf(stderr, "InnoDB: free limit of %s is larger than its real size.\n", filepath);
++				file_is_corrupt = TRUE;
++			}
 +		}
 +
 +		/* get cruster index information */
@@ -239,7 +241,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
 +						file_is_corrupt = TRUE;
 +						descr_is_corrupt = TRUE;
 +					} else {
-+						ut_a(fil_page_get_type(page) == FIL_PAGE_TYPE_XDES);
++
 +						descr_is_corrupt = FALSE;
 +					}
 +
diff --git a/mysql-innodb_fast_checksum.patch b/mysql-innodb_fast_checksum.patch
index 9a4418d..b13a729 100644
--- a/mysql-innodb_fast_checksum.patch
+++ b/mysql-innodb_fast_checksum.patch
@@ -120,7 +120,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  						: BUF_NO_CHECKSUM_MAGIC);
  		mach_write_to_4(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM,
  				srv_use_checksums
-@@ -3280,7 +3282,8 @@
+@@ -3282,7 +3284,8 @@
  					page_is_corrupt = TRUE;
  				}
  
@@ -130,7 +130,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  				    && checksum_field != BUF_NO_CHECKSUM_MAGIC
  				    && checksum_field
  				    != buf_calc_page_new_checksum(page)) {
-@@ -3288,6 +3291,17 @@
+@@ -3290,6 +3293,17 @@
  					page_is_corrupt = TRUE;
  				}
  
@@ -148,7 +148,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  				/* if it is free page, inconsistency is acceptable */
  				if (!offset) {
  					/* header page*/
-@@ -3433,7 +3447,9 @@
+@@ -3435,7 +3449,9 @@
  
  					mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM,
  							srv_use_checksums
diff --git a/mysql-innodb_files_extend.patch b/mysql-innodb_files_extend.patch
index 11f0fbc..2121ffb 100644
--- a/mysql-innodb_files_extend.patch
+++ b/mysql-innodb_files_extend.patch
@@ -29,7 +29,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  			fprintf(stderr,
  				"InnoDB: Error: the size of single-table"
  				" tablespace file %s\n"
-@@ -3778,7 +3778,7 @@
+@@ -3780,7 +3780,7 @@
  
  	size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low;
  #ifndef UNIV_HOTBACKUP
@@ -38,7 +38,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  		fprintf(stderr,
  			"InnoDB: Error: the size of single-table tablespace"
  			" file %s\n"
-@@ -3798,7 +3798,7 @@
+@@ -3800,7 +3800,7 @@
  	/* Align the memory for file i/o if we might have O_DIRECT set */
  	page = ut_align(buf2, UNIV_PAGE_SIZE);
  
@@ -47,7 +47,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  		success = os_file_read(file, page, 0, 0, UNIV_PAGE_SIZE);
  
  		/* We have to read the tablespace id from the file */
-@@ -4776,9 +4776,9 @@
+@@ -4778,9 +4778,9 @@
  	ut_ad(ut_is_2pow(zip_size));
  	ut_ad(buf);
  	ut_ad(len > 0);
diff --git a/mysql-innodb_fix_misc.patch b/mysql-innodb_fix_misc.patch
index 5165bee..4b6e43d 100644
--- a/mysql-innodb_fix_misc.patch
+++ b/mysql-innodb_fix_misc.patch
@@ -141,7 +141,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  #endif
  	/* printf("Deleting tablespace %s id %lu\n", space->name, id); */
  
-@@ -4348,6 +4354,10 @@
+@@ -4350,6 +4356,10 @@
  	ulint		page_size;
  	ibool		success		= TRUE;
  
@@ -152,7 +152,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  	fil_mutex_enter_and_prepare_for_io(space_id);
  
  	space = fil_space_get_by_id(space_id);
-@@ -4359,6 +4369,7 @@
+@@ -4361,6 +4371,7 @@
  		*actual_size = space->size;
  
  		mutex_exit(&fil_system->mutex);
@@ -160,7 +160,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  
  		return(TRUE);
  	}
-@@ -4391,6 +4402,8 @@
+@@ -4393,6 +4404,8 @@
  		offset_low  = ((start_page_no - file_start_page_no)
  			       % (4096 * ((1024 * 1024) / page_size)))
  			* page_size;
@@ -169,7 +169,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  #ifdef UNIV_HOTBACKUP
  		success = os_file_write(node->name, node->handle, buf,
  					offset_low, offset_high,
-@@ -4400,8 +4413,10 @@
+@@ -4402,8 +4415,10 @@
  				 node->name, node->handle, buf,
  				 offset_low, offset_high,
  				 page_size * n_pages,
@@ -181,7 +181,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  		if (success) {
  			node->size += n_pages;
  			space->size += n_pages;
-@@ -4447,6 +4462,7 @@
+@@ -4449,6 +4464,7 @@
  	printf("Extended %s to %lu, actual size %lu pages\n", space->name,
  	size_after_extend, *actual_size); */
  	mutex_exit(&fil_system->mutex);
@@ -189,7 +189,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  
  	fil_flush(space_id);
  
-@@ -4811,6 +4827,22 @@
+@@ -4813,6 +4829,22 @@
  		srv_data_written+= len;
  	}
  
@@ -212,7 +212,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  	/* Reserve the fil_system mutex and make sure that we can open at
  	least one file while holding it, if the file is not already open */
  
-@@ -4940,10 +4972,24 @@
+@@ -4942,10 +4974,24 @@
  #else
  	/* Queue the aio request */
  	ret = os_aio(type, mode | wake_later, node->name, node->handle, buf,
@@ -238,7 +238,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  	ut_a(ret);
  
  	if (mode == OS_AIO_SYNC) {
-@@ -5043,6 +5089,7 @@
+@@ -5045,6 +5091,7 @@
  	fil_node_t*	fil_node;
  	void*		message;
  	ulint		type;
@@ -246,7 +246,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  
  	ut_ad(fil_validate());
  
-@@ -5050,7 +5097,7 @@
+@@ -5052,7 +5099,7 @@
  		srv_set_io_thread_op_info(segment, "native aio handle");
  #ifdef WIN_ASYNC_IO
  		ret = os_aio_windows_handle(segment, 0, &fil_node,
@@ -255,7 +255,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  #else
  		ret = 0; /* Eliminate compiler warning */
  		ut_error;
-@@ -5059,7 +5106,22 @@
+@@ -5061,7 +5108,22 @@
  		srv_set_io_thread_op_info(segment, "simulated aio handle");
  
  		ret = os_aio_simulated_handle(segment, &fil_node,
diff --git a/mysql-innodb_lru_dump_restore.patch b/mysql-innodb_lru_dump_restore.patch
index e0efec9..67cef95 100644
--- a/mysql-innodb_lru_dump_restore.patch
+++ b/mysql-innodb_lru_dump_restore.patch
@@ -335,7 +335,7 @@ diff -ruN a/storage/innodb_plugin/buf/buf0rea.c b/storage/innodb_plugin/buf/buf0
 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:32:40.298411400 +0900
 +++ b/storage/innodb_plugin/fil/fil0fil.c	2010-08-27 16:34:33.868058362 +0900
-@@ -4915,6 +4915,70 @@
+@@ -4917,6 +4917,70 @@
  	return(DB_SUCCESS);
  }
  
diff --git a/mysql-innodb_pass_corrupt_table.patch b/mysql-innodb_pass_corrupt_table.patch
index 3fce911..d21ae6d 100644
--- a/mysql-innodb_pass_corrupt_table.patch
+++ b/mysql-innodb_pass_corrupt_table.patch
@@ -576,7 +576,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  	UT_LIST_ADD_LAST(space_list, fil_system->space_list, space);
  
  	mutex_exit(&fil_system->mutex);
-@@ -4893,6 +4896,22 @@
+@@ -4895,6 +4898,22 @@
  	ut_a(byte_offset % OS_FILE_LOG_BLOCK_SIZE == 0);
  	ut_a((len % OS_FILE_LOG_BLOCK_SIZE) == 0);
  
@@ -599,7 +599,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  #ifdef UNIV_HOTBACKUP
  	/* In ibbackup do normal i/o, not aio */
  	if (type == OS_FILE_READ) {
-@@ -4907,6 +4926,8 @@
+@@ -4909,6 +4928,8 @@
  	ret = os_aio(type, mode | wake_later, node->name, node->handle, buf,
  		     offset_low, offset_high, len, node, message, trx);
  #endif
@@ -608,7 +608,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  	ut_a(ret);
  
  	if (mode == OS_AIO_SYNC) {
-@@ -5045,7 +5066,7 @@
+@@ -5047,7 +5068,7 @@
  
  	if (fil_node->space->purpose == FIL_TABLESPACE) {
  		srv_set_io_thread_op_info(segment, "complete io for buf page");
@@ -617,7 +617,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  	} else {
  		srv_set_io_thread_op_info(segment, "complete io for log");
  		log_io_complete(message);
-@@ -5399,3 +5420,46 @@
+@@ -5401,3 +5422,46 @@
                 return 0;
         }
  }
diff --git a/mysql-innodb_separate_doublewrite.patch b/mysql-innodb_separate_doublewrite.patch
index 4fe5f65..50b0a5e 100644
--- a/mysql-innodb_separate_doublewrite.patch
+++ b/mysql-innodb_separate_doublewrite.patch
@@ -267,7 +267,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  				if (err != DB_SUCCESS) {
  
  					return(err);
-@@ -3782,7 +3792,7 @@
+@@ -3784,7 +3794,7 @@
  	}
  
  #ifndef UNIV_HOTBACKUP
@@ -276,7 +276,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  		fprintf(stderr,
  			"InnoDB: Error: tablespace id %lu in file %s"
  			" is not sensible\n",
-@@ -3791,7 +3801,7 @@
+@@ -3793,7 +3803,7 @@
  		goto func_exit;
  	}
  #else
@@ -285,7 +285,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  		char*	new_path;
  
  		fprintf(stderr,
-@@ -4612,7 +4622,7 @@
+@@ -4614,7 +4624,7 @@
  	}
  
  	if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE
@@ -294,7 +294,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  		/* The node is in the LRU list, remove it */
  
  		ut_a(UT_LIST_GET_LEN(system->LRU) > 0);
-@@ -4658,7 +4668,7 @@
+@@ -4660,7 +4670,7 @@
  	}
  
  	if (node->n_pending == 0 && node->space->purpose == FIL_TABLESPACE
@@ -303,7 +303,7 @@ diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0
  		/* The node must be put back to the LRU list */
  		UT_LIST_ADD_FIRST(LRU, system->LRU, node);
  	}
-@@ -5263,7 +5273,7 @@
+@@ -5265,7 +5275,7 @@
  		ut_a(fil_node->n_pending == 0);
  		ut_a(fil_node->open);
  		ut_a(fil_node->space->purpose == FIL_TABLESPACE);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/percona-server.git/commitdiff/bf636d07b36bfd2921b9ecf2033c78270355c98c



More information about the pld-cvs-commit mailing list