packages: mysql/innodb_adaptive_hash_index_partitions.patch, mysql/innodb_b...

glen glen at pld-linux.org
Thu Mar 10 19:03:08 CET 2011


Author: glen                         Date: Thu Mar 10 18:03:08 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- update percona patches (mysql_dump_ignore_ct.patch needs updating)

---- Files affected:
packages/mysql:
   innodb_adaptive_hash_index_partitions.patch (1.2 -> 1.3) , innodb_buffer_pool_pages_i_s.patch (1.2 -> 1.3) , innodb_buffer_pool_shm.patch (1.2 -> 1.3) , innodb_deadlock_count.patch (1.2 -> 1.3) , innodb_expand_import.patch (1.2 -> 1.3) , innodb_fast_checksum.patch (1.2 -> 1.3) , innodb_files_extend.patch (1.2 -> 1.3) , innodb_fix_misc.patch (1.2 -> 1.3) , innodb_lru_dump_restore.patch (1.2 -> 1.3) , innodb_overwrite_relay_log_info.patch (1.2 -> 1.3) , innodb_pass_corrupt_table.patch (1.2 -> 1.3) , innodb_recovery_patches.patch (1.2 -> 1.3) , innodb_separate_doublewrite.patch (1.2 -> 1.3) , innodb_show_status_extend.patch (1.2 -> 1.3) , innodb_stats.patch (1.2 -> 1.3) , mysql.spec (1.536 -> 1.537) , percona.sh (1.12 -> 1.13) , query_cache_enhance.patch (1.2 -> 1.3) , remove_fcntl_excessive_calls.patch (1.2 -> 1.3) , slow_extended.patch (1.2 -> 1.3) , userstat.patch (1.2 -> 1.3) , log_warnings_suppress.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/mysql/innodb_adaptive_hash_index_partitions.patch
diff -u packages/mysql/innodb_adaptive_hash_index_partitions.patch:1.2 packages/mysql/innodb_adaptive_hash_index_partitions.patch:1.3
--- packages/mysql/innodb_adaptive_hash_index_partitions.patch:1.2	Sat Feb 19 23:16:59 2011
+++ packages/mysql/innodb_adaptive_hash_index_partitions.patch	Thu Mar 10 19:02:59 2011
@@ -1017,7 +1017,7 @@
 diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
 --- a/storage/innobase/buf/buf0lru.c	2010-12-04 15:35:29.137347521 +0900
 +++ b/storage/innobase/buf/buf0lru.c	2010-12-04 16:12:48.658550840 +0900
-@@ -1775,7 +1775,7 @@
+@@ -1810,7 +1810,7 @@
  
  		UNIV_MEM_VALID(((buf_block_t*) bpage)->frame,
  			       UNIV_PAGE_SIZE);
@@ -1066,7 +1066,7 @@
  static MYSQL_SYSVAR_ULONG(replication_delay, srv_replication_delay,
    PLUGIN_VAR_RQCMDARG,
    "Replication thread delay (ms) on the slave server if "
-@@ -11964,6 +11969,7 @@
+@@ -11981,6 +11986,7 @@
    MYSQL_SYSVAR(use_sys_stats_table),
    MYSQL_SYSVAR(stats_sample_pages),
    MYSQL_SYSVAR(adaptive_hash_index),
@@ -1262,7 +1262,7 @@
 diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
 --- a/storage/innobase/include/buf0buf.h	2010-12-15 19:00:07.713604580 +0900
 +++ b/storage/innobase/include/buf0buf.h	2010-12-15 20:58:03.546839883 +0900
-@@ -1544,7 +1544,7 @@
+@@ -1545,7 +1545,7 @@
  					pointers in the adaptive hash index
  					pointing to this frame */
  #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
@@ -1271,7 +1271,7 @@
  					already been built on this
  					page; note that it does not
  					guarantee that the index is
-@@ -1558,6 +1558,7 @@
+@@ -1559,6 +1559,7 @@
  	unsigned	curr_left_side:1;/*!< TRUE or FALSE in hash indexing */
  	dict_index_t*	index;		/*!< Index for which the adaptive
  					hash index has been created. */
@@ -1469,7 +1469,7 @@
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c	2010-12-04 16:12:20.231484679 +0900
 +++ b/storage/innobase/srv/srv0srv.c	2010-12-04 16:12:48.726551018 +0900
-@@ -2042,7 +2042,9 @@
+@@ -2044,7 +2044,9 @@
  	      "-------------------------------------\n", file);
  	ibuf_print(file);
  
@@ -1480,7 +1480,7 @@
  
  	fprintf(file,
  		"%.2f hash searches/s, %.2f non-hash searches/s\n",
-@@ -2067,14 +2069,15 @@
+@@ -2069,14 +2071,15 @@
  			ut_total_allocated_memory,
  			mem_pool_get_reserved(mem_comm_pool));
  	/* Calcurate reserved memories */
@@ -1500,7 +1500,7 @@
  
  	lock_sys_subtotal = 0;
  	if (trx_sys) {
-@@ -2101,10 +2104,10 @@
+@@ -2103,10 +2106,10 @@
  			"    Threads             %lu \t(%lu + %lu)\n",
  
  			(ulong) (btr_search_sys
@@ -1516,15 +1516,15 @@
 diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c
 --- a/storage/innobase/sync/sync0sync.c	2010-12-03 17:36:44.300986571 +0900
 +++ b/storage/innobase/sync/sync0sync.c	2010-12-04 16:12:48.729513564 +0900
-@@ -1183,7 +1183,6 @@
- 	case SYNC_ANY_LATCH:
+@@ -1184,7 +1184,6 @@
+ 	case SYNC_OUTER_ANY_LATCH:
  	case SYNC_FILE_FORMAT_TAG:
  	case SYNC_DOUBLEWRITE:
 -	case SYNC_SEARCH_SYS:
  	case SYNC_SEARCH_SYS_CONF:
  	case SYNC_TRX_LOCK_HEAP:
  	case SYNC_KERNEL:
-@@ -1204,6 +1203,7 @@
+@@ -1205,6 +1204,7 @@
  			ut_error;
  		}
  		break;

================================================================
Index: packages/mysql/innodb_buffer_pool_pages_i_s.patch
diff -u packages/mysql/innodb_buffer_pool_pages_i_s.patch:1.2 packages/mysql/innodb_buffer_pool_pages_i_s.patch:1.3
--- packages/mysql/innodb_buffer_pool_pages_i_s.patch:1.2	Sat Feb 19 23:16:59 2011
+++ packages/mysql/innodb_buffer_pool_pages_i_s.patch	Thu Mar 10 19:02:59 2011
@@ -8,7 +8,7 @@
 diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
 --- a/storage/innobase/buf/buf0buf.c	2010-12-04 20:20:44.595483291 +0900
 +++ b/storage/innobase/buf/buf0buf.c	2010-12-06 19:28:04.055227506 +0900
-@@ -4515,6 +4515,36 @@
+@@ -4516,6 +4516,36 @@
  	mutex_exit(block_mutex);
  }
  
@@ -48,7 +48,7 @@
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc	2010-12-04 20:20:44.614551139 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc	2010-12-06 19:23:47.622195800 +0900
-@@ -12042,6 +12042,9 @@
+@@ -12060,6 +12060,9 @@
  i_s_innodb_sys_stats,
  i_s_innodb_table_stats,
  i_s_innodb_index_stats,

================================================================
Index: packages/mysql/innodb_buffer_pool_shm.patch
diff -u packages/mysql/innodb_buffer_pool_shm.patch:1.2 packages/mysql/innodb_buffer_pool_shm.patch:1.3
--- packages/mysql/innodb_buffer_pool_shm.patch:1.2	Sat Feb 19 23:16:59 2011
+++ packages/mysql/innodb_buffer_pool_shm.patch	Thu Mar 10 19:02:59 2011
@@ -131,7 +131,7 @@
  /********************************************************************//**
  Allocates a chunk of buffer frames.
  @return	chunk, or NULL on failure */
-@@ -1001,26 +1082,188 @@
+@@ -1001,26 +1082,190 @@
  {
  	buf_block_t*	block;
  	byte*		frame;
@@ -139,11 +139,13 @@
 +	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;
 +
@@ -320,7 +322,7 @@
  
  	/* Align a pointer to the first frame.  Note that when
  	os_large_page_size is smaller than UNIV_PAGE_SIZE,
-@@ -1028,8 +1271,13 @@
+@@ -1028,8 +1273,13 @@
  	it is bigger, we may allocate more blocks than requested. */
  
  	frame = ut_align(chunk->mem, UNIV_PAGE_SIZE);
@@ -334,10 +336,14 @@
  
  	/* Subtract the space needed for block descriptors. */
  	{
-@@ -1043,6 +1291,98 @@
+@@ -1043,6 +1293,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;
@@ -433,7 +439,7 @@
  	/* Init block structs and assign frames for them. Then we
  	assign the frames to the first blocks (we already mapped the
  	memory above). */
-@@ -1068,6 +1408,11 @@
+@@ -1068,6 +1414,11 @@
  		block++;
  		frame += UNIV_PAGE_SIZE;
  	}
@@ -445,7 +451,7 @@
  
  #ifdef PFS_GROUP_BUFFER_SYNC
  	pfs_register_buffer_block(chunk);
-@@ -1249,6 +1594,8 @@
+@@ -1249,6 +1600,8 @@
  		UNIV_MEM_UNDESC(block);
  	}
  
@@ -454,7 +460,7 @@
  	os_mem_free_large(chunk->mem, chunk->mem_size);
  }
  
-@@ -1289,7 +1636,7 @@
+@@ -1289,7 +1642,7 @@
  	ulint		instance_no)	/*!< in: id of the instance */
  {
  	ulint		i;
@@ -463,7 +469,7 @@
  
  	/* 1. Initialize general fields
  	------------------------------- */
-@@ -1335,7 +1682,10 @@
+@@ -1335,7 +1688,10 @@
  		buf_pool->curr_pool_size = buf_pool->curr_size * UNIV_PAGE_SIZE;
  
  		buf_pool->page_hash = hash_create(2 * buf_pool->curr_size);
@@ -474,7 +480,7 @@
  		
  		buf_pool->last_printout_time = ut_time();
  	}
-@@ -1354,6 +1704,86 @@
+@@ -1354,6 +1710,86 @@
  
  	/* All fields are initialized by mem_zalloc(). */
  
@@ -561,7 +567,7 @@
  	mutex_exit(&buf_pool->LRU_list_mutex);
  	rw_lock_x_unlock(&buf_pool->page_hash_latch);
  	buf_pool_mutex_exit(buf_pool);
-@@ -1373,6 +1803,42 @@
+@@ -1373,6 +1809,42 @@
  	buf_chunk_t*	chunk;
  	buf_chunk_t*	chunks;
  
@@ -604,7 +610,7 @@
  	chunks = buf_pool->chunks;
  	chunk = chunks + buf_pool->n_chunks;
  
-@@ -1381,10 +1847,13 @@
+@@ -1381,10 +1853,13 @@
  		would fail at shutdown. */
  		os_mem_free_large(chunk->mem, chunk->mem_size);
  	}
@@ -618,7 +624,7 @@
  }
  
  /********************************************************************//**
-@@ -1668,6 +2137,11 @@
+@@ -1668,6 +2143,11 @@
  	//buf_pool_mutex_enter(buf_pool);
  	mutex_enter(&buf_pool->LRU_list_mutex);
  
@@ -630,7 +636,7 @@
  shrink_again:
  	if (buf_pool->n_chunks <= 1) {
  
-@@ -1848,7 +2322,7 @@
+@@ -1848,7 +2328,7 @@
  	zip_hash = hash_create(2 * buf_pool->curr_size);
  
  	HASH_MIGRATE(buf_pool->zip_hash, zip_hash, buf_page_t, hash,
@@ -639,7 +645,7 @@
  
  	hash_table_free(buf_pool->zip_hash);
  	buf_pool->zip_hash = zip_hash;
-@@ -2130,6 +2604,11 @@
+@@ -2130,6 +2610,11 @@
  	ulint	change_size;
  	ulint	min_change_size = 1048576 * srv_buf_pool_instances;
  
@@ -776,7 +782,7 @@
  static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency,
    PLUGIN_VAR_RQCMDARG,
    "Helps in performance tuning in heavily concurrent environments.",
-@@ -11922,6 +11942,8 @@
+@@ -11939,6 +11959,8 @@
    MYSQL_SYSVAR(autoextend_increment),
    MYSQL_SYSVAR(buffer_pool_size),
    MYSQL_SYSVAR(buffer_pool_instances),
@@ -796,7 +802,7 @@
  
  /** @name Modes for buf_page_get_gen */
  /* @{ */
-@@ -1591,9 +1592,12 @@
+@@ -1592,9 +1593,12 @@
  /**********************************************************************//**
  Compute the hash fold value for blocks in buf_pool->zip_hash. */
  /* @{ */

================================================================
Index: packages/mysql/innodb_deadlock_count.patch
diff -u packages/mysql/innodb_deadlock_count.patch:1.2 packages/mysql/innodb_deadlock_count.patch:1.3
--- packages/mysql/innodb_deadlock_count.patch:1.2	Sat Feb 19 23:16:59 2011
+++ packages/mysql/innodb_deadlock_count.patch	Thu Mar 10 19:02:59 2011
@@ -31,7 +31,7 @@
 diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
 --- a/storage/innobase/include/srv0srv.h	2010-12-04 15:55:21.378480843 +0900
 +++ b/storage/innobase/include/srv0srv.h	2010-12-04 16:10:24.606550983 +0900
-@@ -758,6 +758,7 @@
+@@ -760,6 +760,7 @@
  	ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/
  	ulint innodb_dblwr_pages_written;	/*!< srv_dblwr_pages_written */
  	ulint innodb_dblwr_writes;		/*!< srv_dblwr_writes */
@@ -53,7 +53,7 @@
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c	2010-12-04 15:57:13.069513371 +0900
 +++ b/storage/innobase/srv/srv0srv.c	2010-12-04 16:10:24.610593039 +0900
-@@ -467,6 +467,7 @@
+@@ -469,6 +469,7 @@
  static ulint	srv_n_rows_deleted_old		= 0;
  static ulint	srv_n_rows_read_old		= 0;
  
@@ -61,7 +61,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;
-@@ -2285,6 +2286,7 @@
+@@ -2287,6 +2288,7 @@
  	export_vars.innodb_buffer_pool_pages_data = LRU_len;
  	export_vars.innodb_buffer_pool_pages_dirty = flush_list_len;
  	export_vars.innodb_buffer_pool_pages_free = free_len;

================================================================
Index: packages/mysql/innodb_expand_import.patch
diff -u packages/mysql/innodb_expand_import.patch:1.2 packages/mysql/innodb_expand_import.patch:1.3
--- packages/mysql/innodb_expand_import.patch:1.2	Sat Feb 19 23:16:59 2011
+++ packages/mysql/innodb_expand_import.patch	Thu Mar 10 19:02:59 2011
@@ -241,7 +241,7 @@
 +						file_is_corrupt = TRUE;
 +						descr_is_corrupt = TRUE;
 +					} else {
-+						ut_a(fil_page_get_type(page) == FIL_PAGE_TYPE_XDES);
++						ut_ad(fil_page_get_type(page) == FIL_PAGE_TYPE_XDES);
 +						descr_is_corrupt = FALSE;
 +					}
 +
@@ -519,7 +519,7 @@
    "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)",
    NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib);
  
-+static MYSQL_SYSVAR_ULONG(expand_import, srv_expand_import,
++static MYSQL_SYSVAR_ULONG(import_table_from_xtrabackup, srv_expand_import,
 +  PLUGIN_VAR_RQCMDARG,
 +  "Enable/Disable converting automatically *.ibd files when import tablespace.",
 +  NULL, NULL, 0, 0, 1, 0);
@@ -531,7 +531,7 @@
    MYSQL_SYSVAR(flush_neighbor_pages),
    MYSQL_SYSVAR(read_ahead),
    MYSQL_SYSVAR(adaptive_flushing_method),
-+  MYSQL_SYSVAR(expand_import),
++  MYSQL_SYSVAR(import_table_from_xtrabackup),
    MYSQL_SYSVAR(extra_rsegments),
    MYSQL_SYSVAR(dict_size_limit),
    MYSQL_SYSVAR(use_sys_malloc),

================================================================
Index: packages/mysql/innodb_fast_checksum.patch
diff -u packages/mysql/innodb_fast_checksum.patch:1.2 packages/mysql/innodb_fast_checksum.patch:1.3
--- packages/mysql/innodb_fast_checksum.patch:1.2	Sat Feb 19 23:16:59 2011
+++ packages/mysql/innodb_fast_checksum.patch	Thu Mar 10 19:02:59 2011
@@ -194,7 +194,7 @@
  static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir,
    PLUGIN_VAR_READONLY,
    "The common part for InnoDB table spaces.",
-@@ -11831,6 +11842,7 @@
+@@ -11842,6 +11853,7 @@
    MYSQL_SYSVAR(buffer_pool_size),
    MYSQL_SYSVAR(buffer_pool_instances),
    MYSQL_SYSVAR(checksums),

================================================================
Index: packages/mysql/innodb_files_extend.patch
diff -u packages/mysql/innodb_files_extend.patch:1.2 packages/mysql/innodb_files_extend.patch:1.3
--- packages/mysql/innodb_files_extend.patch:1.2	Sat Feb 19 23:16:59 2011
+++ packages/mysql/innodb_files_extend.patch	Thu Mar 10 19:02:59 2011
@@ -217,8 +217,8 @@
  static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir,
    PLUGIN_VAR_READONLY,
    "The common part for InnoDB table spaces.",
-@@ -11837,6 +11909,8 @@
-   NULL, NULL, 0, 0, 1, 0);
+@@ -11848,6 +11920,8 @@
+   NULL, NULL, 0, &corrupt_table_action_typelib);
  
  static struct st_mysql_sys_var* innobase_system_variables[]= {
 +  MYSQL_SYSVAR(page_size),

================================================================
Index: packages/mysql/innodb_fix_misc.patch
diff -u packages/mysql/innodb_fix_misc.patch:1.2 packages/mysql/innodb_fix_misc.patch:1.3
--- packages/mysql/innodb_fix_misc.patch:1.2	Sat Feb 19 23:16:59 2011
+++ packages/mysql/innodb_fix_misc.patch	Thu Mar 10 19:02:59 2011
@@ -2,12 +2,106 @@
 # introduced : 11 or before
 # maintainer : Yasufumi
 #
+# Bug fix for
+# http://bugs.mysql.com/56433 (always: because good for all users, and safe)
+# and http://bugs.mysql.com/51325 (optional: innodb_lazy_drop_table)
+# were added. They may be removed in the future when will be fixed officially.
+#
 #!!! notice !!!
 # Any small change to this file in the main branch
 # should be done or reviewed by the maintainer!
 #
 # comment: http://lists.mysql.com/commits/112400 is applied also for innodb_plugin
 #          to pass innodb_bug53756.test by innodb_plugin
+diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
+--- a/storage/innobase/buf/buf0buf.c	2011-02-23 19:00:48.178696354 +0900
++++ b/storage/innobase/buf/buf0buf.c	2011-02-23 19:01:19.138826278 +0900
+@@ -4043,6 +4043,7 @@
+ 		bpage->state	= BUF_BLOCK_ZIP_PAGE;
+ 		bpage->space	= space;
+ 		bpage->offset	= offset;
++		bpage->space_was_being_deleted = FALSE;
+ 
+ 
+ #ifdef UNIV_DEBUG
+diff -ruN a/storage/innobase/buf/buf0flu.c b/storage/innobase/buf/buf0flu.c
+--- a/storage/innobase/buf/buf0flu.c	2011-02-23 19:00:48.182659256 +0900
++++ b/storage/innobase/buf/buf0flu.c	2011-02-23 19:01:19.138826278 +0900
+@@ -439,7 +439,7 @@
+ 
+ 	if (UNIV_LIKELY(bpage->in_LRU_list && buf_page_in_file(bpage))) {
+ 
+-		return(bpage->oldest_modification == 0
++		return((bpage->oldest_modification == 0 || bpage->space_was_being_deleted)
+ 		       && buf_page_get_io_fix(bpage) == BUF_IO_NONE
+ 		       && bpage->buf_fix_count == 0);
+ 	}
+@@ -481,6 +481,13 @@
+ 	    && buf_page_get_io_fix(bpage) == BUF_IO_NONE) {
+ 		ut_ad(bpage->in_flush_list);
+ 
++		if (bpage->space_was_being_deleted) {
++			/* should be removed from flush_list here */
++			/* because buf_flush_try_neighbors() cannot flush without fil_space_get_size(space) */
++			buf_flush_remove(bpage);
++			return(FALSE);
++		}
++
+ 		if (flush_type != BUF_FLUSH_LRU) {
+ 
+ 			return(TRUE);
+diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
+--- a/storage/innobase/buf/buf0lru.c	2011-02-23 19:00:47.939695791 +0900
++++ b/storage/innobase/buf/buf0lru.c	2011-02-23 19:01:19.142741970 +0900
+@@ -554,6 +554,37 @@
+ 	}
+ }
+ 
++/******************************************************************//**
++*/
++UNIV_INTERN
++void
++buf_LRU_mark_space_was_deleted(
++/*===========================*/
++	ulint	id)	/*!< in: space id */
++{
++	ulint	i;
++
++	for (i = 0; i < srv_buf_pool_instances; i++) {
++		buf_pool_t*	buf_pool;
++		buf_page_t*	bpage;
++
++		buf_pool = buf_pool_from_array(i);
++
++		mutex_enter(&buf_pool->LRU_list_mutex);
++
++		bpage = UT_LIST_GET_FIRST(buf_pool->LRU);
++
++		while (bpage != NULL) {
++			if (buf_page_get_space(bpage) == id) {
++				bpage->space_was_being_deleted = TRUE;
++			}
++			bpage = UT_LIST_GET_NEXT(LRU, bpage);
++		}
++
++		mutex_exit(&buf_pool->LRU_list_mutex);
++	}
++}
++
+ /********************************************************************//**
+ Insert a compressed block into buf_pool->zip_clean in the LRU order. */
+ UNIV_INTERN
+@@ -1568,6 +1599,10 @@
+ 		return(BUF_LRU_NOT_FREED);
+ 	}
+ 
++	if (bpage->space_was_being_deleted && bpage->oldest_modification != 0) {
++		buf_flush_remove(bpage);
++	}
++
+ #ifdef UNIV_IBUF_COUNT_DEBUG
+ 	ut_a(ibuf_count_get(bpage->space, bpage->offset) == 0);
+ #endif /* UNIV_IBUF_COUNT_DEBUG */
 diff -ruN a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.c
 --- a/storage/innobase/dict/dict0load.c	2010-12-04 15:37:50.559480289 +0900
 +++ b/storage/innobase/dict/dict0load.c	2010-12-04 15:57:53.078513745 +0900
@@ -68,10 +162,223 @@
  	btr_pcur_close(&pcur);
  	mtr_commit(&mtr);
  	mem_heap_free(heap);
+diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
+--- a/storage/innobase/fil/fil0fil.c	2011-02-23 19:00:48.223696428 +0900
++++ b/storage/innobase/fil/fil0fil.c	2011-02-23 19:01:19.147655510 +0900
+@@ -252,6 +252,7 @@
+ struct fil_system_struct {
+ #ifndef UNIV_HOTBACKUP
+ 	mutex_t		mutex;		/*!< The mutex protecting the cache */
++	mutex_t		file_extend_mutex;
+ #endif /* !UNIV_HOTBACKUP */
+ 	hash_table_t*	spaces;		/*!< The hash table of spaces in the
+ 					system; they are hashed on the space
+@@ -861,7 +862,7 @@
+ 	ut_ad(node && system);
+ 	ut_ad(mutex_own(&(system->mutex)));
+ 	ut_a(node->open);
+-	ut_a(node->n_pending == 0);
++	ut_a(node->n_pending == 0 || srv_lazy_drop_table);
+ 	ut_a(node->n_pending_flushes == 0);
+ 	ut_a(node->modification_counter == node->flush_counter);
+ 
+@@ -1073,7 +1074,7 @@
+ 	ut_ad(node && system && space);
+ 	ut_ad(mutex_own(&(system->mutex)));
+ 	ut_a(node->magic_n == FIL_NODE_MAGIC_N);
+-	ut_a(node->n_pending == 0);
++	ut_a(node->n_pending == 0 || srv_lazy_drop_table);
+ 
+ 	if (node->open) {
+ 		/* We fool the assertion in fil_node_close_file() to think
+@@ -1595,6 +1596,8 @@
+ 
+ 	mutex_create(fil_system_mutex_key,
+ 		     &fil_system->mutex, SYNC_ANY_LATCH);
++	mutex_create(fil_system_mutex_key,
++		     &fil_system->file_extend_mutex, SYNC_OUTER_ANY_LATCH);
+ 
+ 	fil_system->spaces = hash_create(hash_size);
+ 	fil_system->name_hash = hash_create(hash_size);
+@@ -2341,7 +2344,11 @@
+ 	completely and permanently. The flag is_being_deleted also prevents
+ 	fil_flush() from being applied to this tablespace. */
+ 
++	if (srv_lazy_drop_table) {
++		buf_LRU_mark_space_was_deleted(id);
++	} else {
+ 	buf_LRU_invalidate_tablespace(id);
++	}
+ #endif
+ 	/* printf("Deleting tablespace %s id %lu\n", space->name, id); */
+ 
+@@ -4400,6 +4407,10 @@
+ 	ulint		page_size;
+ 	ibool		success		= TRUE;
+ 
++	/* file_extend_mutex is for http://bugs.mysql.com/56433 */
++	/* to protect from the other fil_extend_space_to_desired_size() */
++	/* during temprary releasing &fil_system->mutex */
++	mutex_enter(&fil_system->file_extend_mutex);
+ 	fil_mutex_enter_and_prepare_for_io(space_id);
+ 
+ 	space = fil_space_get_by_id(space_id);
+@@ -4411,6 +4422,7 @@
+ 		*actual_size = space->size;
+ 
+ 		mutex_exit(&fil_system->mutex);
++		mutex_exit(&fil_system->file_extend_mutex);
+ 
+ 		return(TRUE);
+ 	}
+@@ -4443,6 +4455,8 @@
+ 		offset_low  = ((start_page_no - file_start_page_no)
+ 			       % (4096 * ((1024 * 1024) / page_size)))
+ 			* page_size;
++
++		mutex_exit(&fil_system->mutex);
+ #ifdef UNIV_HOTBACKUP
+ 		success = os_file_write(node->name, node->handle, buf,
+ 					offset_low, offset_high,
+@@ -4452,8 +4466,10 @@
+ 				 node->name, node->handle, buf,
+ 				 offset_low, offset_high,
+ 				 page_size * n_pages,
+-				 NULL, NULL, NULL);
++				 NULL, NULL, space_id, NULL);
+ #endif
++		mutex_enter(&fil_system->mutex);
++
+ 		if (success) {
+ 			node->size += n_pages;
+ 			space->size += n_pages;
+@@ -4499,6 +4515,7 @@
+ 	printf("Extended %s to %lu, actual size %lu pages\n", space->name,
+ 	size_after_extend, *actual_size); */
+ 	mutex_exit(&fil_system->mutex);
++	mutex_exit(&fil_system->file_extend_mutex);
+ 
+ 	fil_flush(space_id);
+ 
+@@ -4863,6 +4880,22 @@
+ 		srv_data_written+= len;
+ 	}
+ 
++	/* if the table space was already deleted, space might not exist already. */
++	if (message
++	    && space_id < SRV_LOG_SPACE_FIRST_ID
++	    && ((buf_page_t*)message)->space_was_being_deleted) {
++
++		if (mode == OS_AIO_NORMAL) {
++			buf_page_io_complete(message, trx);
++			return(DB_SUCCESS); /*fake*/
++		}
++		if (type == OS_FILE_READ) {
++			return(DB_TABLESPACE_DELETED);
++		} else {
++			return(DB_SUCCESS); /*fake*/
++		}
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_adaptive_hash_index_partitions.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_buffer_pool_pages_i_s.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_buffer_pool_shm.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_deadlock_count.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_expand_import.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_fast_checksum.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_files_extend.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_fix_misc.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_lru_dump_restore.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_overwrite_relay_log_info.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_pass_corrupt_table.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_recovery_patches.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_separate_doublewrite.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_show_status_extend.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/innodb_stats.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql.spec?r1=1.536&r2=1.537&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/percona.sh?r1=1.12&r2=1.13&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/query_cache_enhance.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/remove_fcntl_excessive_calls.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/slow_extended.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/userstat.patch?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list