[packages/percona-server/v5.0.x: 131/202] - update to 5.0.87, percona to b19

glen glen at pld-linux.org
Wed Oct 21 16:20:02 CEST 2015


commit 5b9e9ff4a60a82ce3158e94714ff7b5ce39694fa
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Tue Oct 27 10:04:57 2009 +0000

    - update to 5.0.87, percona to b19
    
    Changed files:
        mysql-innodb_dict_size_limit.patch -> 1.1.2.2
        mysql-innodb_misc_patch.patch -> 1.1.2.1
        mysql-innodb_split_buf_pool_mutex.patch -> 1.1.2.2
        mysql-userstatv2.patch -> 1.1.2.12
        mysql.spec -> 1.353.2.81

 mysql-innodb_dict_size_limit.patch      | 298 ++++++++++++++++++++++++--------
 mysql-innodb_misc_patch.patch           |  64 +++++++
 mysql-innodb_split_buf_pool_mutex.patch | 233 ++++++++++++++-----------
 mysql-userstatv2.patch                  |   2 +-
 mysql.spec                              |  15 +-
 5 files changed, 426 insertions(+), 186 deletions(-)
---
diff --git a/mysql.spec b/mysql.spec
index 8521207..aad164b 100644
--- a/mysql.spec
+++ b/mysql.spec
@@ -15,7 +15,6 @@
 %bcond_with	xtrabackup		# XtraBackup
 
 %include	/usr/lib/rpm/macros.perl
-#define	_snap	20060111
 Summary:	MySQL: a very fast and reliable SQL database engine
 Summary(de.UTF-8):	MySQL: ist eine SQL-Datenbank
 Summary(fr.UTF-8):	MySQL: un serveur SQL rapide et fiable
@@ -25,13 +24,13 @@ Summary(ru.UTF-8):	MySQL - быстрый SQL-сервер
 Summary(uk.UTF-8):	MySQL - швидкий SQL-сервер
 Summary(zh_CN.UTF-8):	MySQL数据库服务器
 Name:		mysql
-Version:	5.0.86
+Version:	5.0.87
 Release:	1
 License:	GPL + MySQL FLOSS Exception
 Group:		Applications/Databases
 #Source0:	ftp://ftp.mysql.com/pub/mysql/src/%{name}-%{version}.tar.gz
 Source0:	http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.0/%{name}-%{version}.tar.gz
-# Source0-md5:	c1f746bfbc8c2cb3ec1e0427a8a88c55
+# Source0-md5:	65e6229cc98b6a8d4c5206d7fe16c7be
 #Source0:	http://mysql.he.net/Downloads/MySQL-5.0/%{name}-%{version}.tar.gz
 #Source0:	http://mirror.provenscaling.com/mysql/enterprise/source/5.0/%{name}-%{version}.tar.gz
 Source100:	http://www.sphinxsearch.com/downloads/sphinx-0.9.9-rc2.tar.gz
@@ -89,9 +88,10 @@ Patch113:	%{name}-innodb_extra_rseg.patch
 Patch114:	%{name}-innodb_thread_concurrency_timer_based.patch
 Patch115:	%{name}-innodb_use_sys_malloc.patch
 Patch116:	%{name}-innodb_recovery_patches.patch
-Patch117:	%{name}-innodb_split_buf_pool_mutex.patch
-Patch118:	%{name}-innodb_rw_lock.patch
-Patch119:	%{name}-mysql-test.patch
+Patch117:	%{name}-innodb_misc_patch.patch
+Patch118:	%{name}-innodb_split_buf_pool_mutex.patch
+Patch119:	%{name}-innodb_rw_lock.patch
+Patch120:	%{name}-mysql-test.patch
 # </percona>
 URL:		http://www.mysql.com/products/database/mysql/community_edition.html
 BuildRequires:	autoconf
@@ -493,7 +493,7 @@ This package contains the standard MySQL NDB CPC Daemon.
 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
 
 %prep
-%setup -q %{?_snap:-n %{name}-%{version}-nightly-%{_snap}} %{?with_sphinx:-a100}
+%setup -q %{?with_sphinx:-a100}
 %patch0 -p1
 %if %{with sphinx}
 mv sphinx-*/mysqlse sql/sphinx
@@ -546,6 +546,7 @@ mv sphinx-*/mysqlse sql/sphinx
 %patch117 -p1
 %patch118 -p1
 %patch119 -p1
+%patch120 -p1
 # </percona>
 
 %patch19 -p1
diff --git a/mysql-innodb_dict_size_limit.patch b/mysql-innodb_dict_size_limit.patch
index 843d043..ced1aec 100644
--- a/mysql-innodb_dict_size_limit.patch
+++ b/mysql-innodb_dict_size_limit.patch
@@ -1,6 +1,134 @@
-diff -r 6eeee157fd40 innobase/dict/dict0boot.c
---- a/innobase/dict/dict0boot.c	Fri Jul 03 15:41:34 2009 -0700
-+++ b/innobase/dict/dict0boot.c	Fri Jul 03 15:41:41 2009 -0700
+diff -ruN a/innobase/btr/btr0sea.c b/innobase/btr/btr0sea.c
+--- a/innobase/btr/btr0sea.c	2009-08-27 18:42:17.000000000 +0900
++++ b/innobase/btr/btr0sea.c	2009-08-27 18:43:11.000000000 +0900
+@@ -1077,6 +1077,124 @@
+ }
+ 
+ /************************************************************************
++Drops a page hash index based on index */
++
++void
++btr_search_drop_page_hash_index_on_index(
++/*=====================================*/
++	dict_index_t*	index)		/* in: record descriptor */
++{
++	page_t*		page;
++	hash_table_t*	table;
++	buf_block_t*	block;
++	ulint		n_fields;
++	ulint		n_bytes;
++	rec_t*		rec;
++	ulint		fold;
++	ulint		prev_fold;
++	dulint		tree_id;
++	ulint		n_cached;
++	ulint		n_recs;
++	ulint*		folds;
++	ulint		i;
++	mem_heap_t*	heap	= NULL;
++	ulint*		offsets;
++
++	rw_lock_x_lock(&btr_search_latch);
++	mutex_enter(&buf_pool->mutex);
++
++	table = btr_search_sys->hash_index;
++
++	block = UT_LIST_GET_LAST(buf_pool->LRU);
++
++	while (block != NULL) {
++		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;
++
++			ut_a(n_fields + n_bytes > 0);
++
++			n_recs = page_get_n_recs(page);
++
++			/* Calculate and cache fold values into an array for fast deletion
++			from the hash index */
++
++			folds = mem_alloc(n_recs * sizeof(ulint));
++
++			n_cached = 0;
++
++			rec = page_get_infimum_rec(page);
++			rec = page_rec_get_next(rec);
++
++			tree_id = btr_page_get_index_id(page);
++	
++			ut_a(0 == ut_dulint_cmp(tree_id, index->id));
++
++			prev_fold = 0;
++
++			offsets = NULL;
++
++			while (!page_rec_is_supremum(rec)) {
++				/* FIXME: in a mixed tree, not all records may have enough
++				ordering fields: */
++				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, tree_id);
++
++				if (fold == prev_fold && prev_fold != 0) {
++
++					goto next_rec;
++				}
++
++				/* Remove all hash nodes pointing to this page from the
++				hash chain */
++
++				folds[n_cached] = fold;
++				n_cached++;
++next_rec:
++				rec = page_rec_get_next(rec);
++				prev_fold = fold;
++			}
++
++			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;
++	
++			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);
++			}
++
++			mem_free(folds);
++		}
++
++		block = UT_LIST_GET_PREV(LRU, block);
++	}
++
++	mutex_exit(&buf_pool->mutex);
++	rw_lock_x_unlock(&btr_search_latch);
++
++	if (UNIV_LIKELY_NULL(heap)) {
++		mem_heap_free(heap);
++	}
++}
++
++/************************************************************************
+ Drops a page hash index when a page is freed from a fseg to the file system.
+ Drops possible hash index if the page happens to be in the buffer pool. */
+ 
+diff -ruN a/innobase/dict/dict0boot.c b/innobase/dict/dict0boot.c
+--- a/innobase/dict/dict0boot.c	2009-07-07 21:53:58.000000000 +0900
++++ b/innobase/dict/dict0boot.c	2009-08-27 18:42:59.000000000 +0900
 @@ -247,6 +247,7 @@
  	system tables */
  	/*-------------------------*/
@@ -33,9 +161,9 @@ diff -r 6eeee157fd40 innobase/dict/dict0boot.c
  
  	dict_mem_table_add_col(table, "INDEX_ID", DATA_BINARY, 0,0,0);
  	dict_mem_table_add_col(table, "POS", DATA_INT, 0, 4, 0);
-diff -r 6eeee157fd40 innobase/dict/dict0crea.c
---- a/innobase/dict/dict0crea.c	Fri Jul 03 15:41:34 2009 -0700
-+++ b/innobase/dict/dict0crea.c	Fri Jul 03 15:41:41 2009 -0700
+diff -ruN a/innobase/dict/dict0crea.c b/innobase/dict/dict0crea.c
+--- a/innobase/dict/dict0crea.c	2009-07-07 21:53:58.000000000 +0900
++++ b/innobase/dict/dict0crea.c	2009-08-27 18:42:59.000000000 +0900
 @@ -1178,6 +1178,9 @@
              	/* Foreign constraint system tables have already been
              	created, and they are ok */
@@ -46,21 +174,21 @@ diff -r 6eeee157fd40 innobase/dict/dict0crea.c
  		mutex_exit(&(dict_sys->mutex));
  
              	return(DB_SUCCESS);
-@@ -1266,6 +1269,11 @@
- 	que_graph_free(graph);
+@@ -1267,6 +1270,11 @@
  	
  	trx->op_info = "";
-+
+ 
 +	table1 = dict_table_get_low("SYS_FOREIGN");
 +	table2 = dict_table_get_low("SYS_FOREIGN_COLS");
 +	table1->n_mysql_handles_opened = 1; /* for pin */
 +	table2->n_mysql_handles_opened = 1; /* for pin */
- 
++
  	row_mysql_unlock_data_dictionary(trx);
  
-diff -r 6eeee157fd40 innobase/dict/dict0dict.c
---- a/innobase/dict/dict0dict.c	Fri Jul 03 15:41:34 2009 -0700
-+++ b/innobase/dict/dict0dict.c	Fri Jul 03 15:41:41 2009 -0700
+   	trx_free_for_mysql(trx);
+diff -ruN a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
+--- a/innobase/dict/dict0dict.c	2009-07-07 21:53:58.000000000 +0900
++++ b/innobase/dict/dict0dict.c	2009-08-27 18:43:11.000000000 +0900
 @@ -638,6 +638,8 @@
  	mutex_enter(&(dict_sys->mutex));
  
@@ -79,15 +207,15 @@ diff -r 6eeee157fd40 innobase/dict/dict0dict.c
  	mutex_exit(&(dict_sys->mutex));
  
  	if (table != NULL) {
-@@ -786,6 +790,8 @@
- 
+@@ -787,6 +791,8 @@
  	        table->n_mysql_handles_opened++;
  	}
-+
-+	dict_table_LRU_trim(table);
  
++	dict_table_LRU_trim(table);
++
  	mutex_exit(&(dict_sys->mutex));
  
+ 	if (table != NULL) {
 @@ -1267,20 +1273,64 @@
  too much space. Currently not used! */
  
@@ -100,24 +228,18 @@ diff -r 6eeee157fd40 innobase/dict/dict0dict.c
  {
  	dict_table_t*	table;
  	dict_table_t*	prev_table;
--
--	ut_error;
--
--#ifdef UNIV_SYNC_DEBUG
--	ut_ad(mutex_own(&(dict_sys->mutex)));
--#endif /* UNIV_SYNC_DEBUG */
--
 +	dict_foreign_t*	foreign;
 +	ulint		n_removed;
 +	ulint		n_have_parent;
 +	ulint		cached_foreign_tables;
-+
+ 
+-	ut_error;
 +	//ut_error;
-+
-+#ifdef UNIV_SYNC_DEBUG
-+	ut_ad(mutex_own(&(dict_sys->mutex)));
-+#endif /* UNIV_SYNC_DEBUG */
-+
+ 
+ #ifdef UNIV_SYNC_DEBUG
+ 	ut_ad(mutex_own(&(dict_sys->mutex)));
+ #endif /* UNIV_SYNC_DEBUG */
+ 
 +retry:
 +	n_removed = n_have_parent = 0;
  	table = UT_LIST_GET_LAST(dict_sys->table_LRU);
@@ -170,9 +292,20 @@ diff -r 6eeee157fd40 innobase/dict/dict0dict.c
  }
  
  /**************************************************************************
-diff -r 6eeee157fd40 innobase/ibuf/ibuf0ibuf.c
---- a/innobase/ibuf/ibuf0ibuf.c	Fri Jul 03 15:41:34 2009 -0700
-+++ b/innobase/ibuf/ibuf0ibuf.c	Fri Jul 03 15:41:41 2009 -0700
+@@ -1565,6 +1616,10 @@
+ #ifdef UNIV_SYNC_DEBUG
+ 	ut_ad(mutex_own(&(dict_sys->mutex)));
+ #endif /* UNIV_SYNC_DEBUG */
++	/* remove all entry of the index from adaptive hash index,
++	because removing from adaptive hash index needs dict_index */
++	if (srv_use_adaptive_hash_indexes && srv_dict_size_limit)
++		btr_search_drop_page_hash_index_on_index(index);
+ 
+ 	/* We always create search info whether or not adaptive
+ 	hash index is enabled or not. */
+diff -ruN a/innobase/ibuf/ibuf0ibuf.c b/innobase/ibuf/ibuf0ibuf.c
+--- a/innobase/ibuf/ibuf0ibuf.c	2009-08-27 18:42:17.000000000 +0900
++++ b/innobase/ibuf/ibuf0ibuf.c	2009-08-27 18:42:59.000000000 +0900
 @@ -535,6 +535,7 @@
  	sprintf(buf, "SYS_IBUF_TABLE_%lu", (ulong) space);
  	/* use old-style record format for the insert buffer */
@@ -181,9 +314,26 @@ diff -r 6eeee157fd40 innobase/ibuf/ibuf0ibuf.c
  
  	dict_mem_table_add_col(table, "PAGE_NO", DATA_BINARY, 0, 0, 0);
  	dict_mem_table_add_col(table, "TYPES", DATA_BINARY, 0, 0, 0);
-diff -r 6eeee157fd40 innobase/include/dict0dict.h
---- a/innobase/include/dict0dict.h	Fri Jul 03 15:41:34 2009 -0700
-+++ b/innobase/include/dict0dict.h	Fri Jul 03 15:41:41 2009 -0700
+diff -ruN a/innobase/include/btr0sea.h b/innobase/include/btr0sea.h
+--- a/innobase/include/btr0sea.h	2009-07-07 21:54:00.000000000 +0900
++++ b/innobase/include/btr0sea.h	2009-08-27 18:43:11.000000000 +0900
+@@ -97,6 +97,13 @@
+ /*============================*/
+ 	page_t*	page);	/* in: index page, s- or x-latched */
+ /************************************************************************
++Drops a page hash index based on index */
++
++void
++btr_search_drop_page_hash_index_on_index(
++/*=====================================*/
++	dict_index_t*	index);		/* in: record descriptor */
++/************************************************************************
+ Drops a page hash index when a page is freed from a fseg to the file system.
+ Drops possible hash index if the page happens to be in the buffer pool. */
+ 
+diff -ruN a/innobase/include/dict0dict.h b/innobase/include/dict0dict.h
+--- a/innobase/include/dict0dict.h	2009-07-07 21:54:01.000000000 +0900
++++ b/innobase/include/dict0dict.h	2009-08-27 18:42:59.000000000 +0900
 @@ -938,6 +938,11 @@
  	const char*	ptr,	/* in: scan from */
  	const char*	string);/* in: look for this */
@@ -196,9 +346,9 @@ diff -r 6eeee157fd40 innobase/include/dict0dict.h
  /* Buffers for storing detailed information about the latest foreign key
  and unique key errors */
  extern FILE*	dict_foreign_err_file;
-diff -r 6eeee157fd40 innobase/include/dict0dict.ic
---- a/innobase/include/dict0dict.ic	Fri Jul 03 15:41:34 2009 -0700
-+++ b/innobase/include/dict0dict.ic	Fri Jul 03 15:41:41 2009 -0700
+diff -ruN a/innobase/include/dict0dict.ic b/innobase/include/dict0dict.ic
+--- a/innobase/include/dict0dict.ic	2009-07-07 21:54:01.000000000 +0900
++++ b/innobase/include/dict0dict.ic	2009-08-27 18:42:59.000000000 +0900
 @@ -533,6 +533,13 @@
  
  	HASH_SEARCH(name_hash, dict_sys->table_hash, table_fold, table,
@@ -224,18 +374,18 @@ diff -r 6eeee157fd40 innobase/include/dict0dict.ic
  		/* lock_push(trx, table, LOCK_DICT_MEM_FIX) */
  	}
  	
-diff -r 6eeee157fd40 innobase/include/srv0srv.h
---- a/innobase/include/srv0srv.h	Fri Jul 03 15:41:34 2009 -0700
-+++ b/innobase/include/srv0srv.h	Fri Jul 03 15:41:41 2009 -0700
-@@ -146,6 +146,8 @@
- extern ulint	srv_enable_unsafe_group_commit;
+diff -ruN a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h
+--- a/innobase/include/srv0srv.h	2009-08-27 18:42:17.000000000 +0900
++++ b/innobase/include/srv0srv.h	2009-08-27 18:42:59.000000000 +0900
+@@ -147,6 +147,8 @@
  extern uint	srv_read_ahead;
  extern uint	srv_adaptive_checkpoint;
-+
-+extern ulint	srv_dict_size_limit;
  
++extern ulint	srv_dict_size_limit;
++
  extern volatile ibool srv_io_pattern;
  extern ulong	srv_io_pattern_trace;
+ extern ulong	srv_io_pattern_trace_running;
 @@ -552,6 +554,7 @@
          ulint innodb_data_writes;
          ulint innodb_data_written;
@@ -244,18 +394,18 @@ diff -r 6eeee157fd40 innobase/include/srv0srv.h
          ulint innodb_buffer_pool_pages_total;
          ulint innodb_buffer_pool_pages_data;
          ulint innodb_buffer_pool_pages_dirty;
-diff -r 6eeee157fd40 innobase/srv/srv0srv.c
---- a/innobase/srv/srv0srv.c	Fri Jul 03 15:41:34 2009 -0700
-+++ b/innobase/srv/srv0srv.c	Fri Jul 03 15:41:41 2009 -0700
-@@ -352,6 +352,8 @@
- 
+diff -ruN a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
+--- a/innobase/srv/srv0srv.c	2009-08-27 18:42:17.000000000 +0900
++++ b/innobase/srv/srv0srv.c	2009-08-27 18:42:59.000000000 +0900
+@@ -353,6 +353,8 @@
  uint	srv_read_ahead = 3; /* 1: random  2: linear  3: Both */
  uint	srv_adaptive_checkpoint = 0; /* 0: none  1: reflex  2: estimate */
-+
-+ulint	srv_dict_size_limit = 0;
  
++ulint	srv_dict_size_limit = 0;
++
  volatile ibool srv_io_pattern = FALSE;
  ulint   srv_io_pattern_trace = 0;
+ ulint   srv_io_pattern_trace_running = 0;
 @@ -1953,6 +1955,7 @@
          export_vars.innodb_data_reads= os_n_file_reads;
          export_vars.innodb_data_writes= os_n_file_writes;
@@ -264,9 +414,9 @@ diff -r 6eeee157fd40 innobase/srv/srv0srv.c
          export_vars.innodb_buffer_pool_read_requests= buf_pool->n_page_gets;
          export_vars.innodb_buffer_pool_write_requests= srv_buf_pool_write_requests;
          export_vars.innodb_buffer_pool_wait_free= srv_buf_pool_wait_free;
-diff -r 6eeee157fd40 mysql-test/r/innodb_dict_size_limit.result
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/mysql-test/r/innodb_dict_size_limit.result	Fri Jul 03 15:41:41 2009 -0700
+diff -ruN a/mysql-test/r/innodb_dict_size_limit.result b/mysql-test/r/innodb_dict_size_limit.result
+--- /dev/null	1970-01-01 09:00:00.000000000 +0900
++++ b/mysql-test/r/innodb_dict_size_limit.result	2009-08-27 18:42:59.000000000 +0900
 @@ -0,0 +1,60 @@
 +DROP TABLE IF EXISTS `test_5`;
 +DROP TABLE IF EXISTS `test_4`;
@@ -328,9 +478,9 @@ diff -r 6eeee157fd40 mysql-test/r/innodb_dict_size_limit.result
 +DROP TABLE `test_3`;
 +DROP TABLE `test_2`;
 +DROP TABLE `test_1`;
-diff -r 6eeee157fd40 mysql-test/t/innodb_dict_size_limit.test
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/mysql-test/t/innodb_dict_size_limit.test	Fri Jul 03 15:41:41 2009 -0700
+diff -ruN a/mysql-test/t/innodb_dict_size_limit.test b/mysql-test/t/innodb_dict_size_limit.test
+--- /dev/null	1970-01-01 09:00:00.000000000 +0900
++++ b/mysql-test/t/innodb_dict_size_limit.test	2009-08-27 18:42:59.000000000 +0900
 @@ -0,0 +1,63 @@
 +#
 +# Test for new variable innodb_dict_size_limit;
@@ -395,9 +545,9 @@ diff -r 6eeee157fd40 mysql-test/t/innodb_dict_size_limit.test
 +DROP TABLE `test_2`;
 +DROP TABLE `test_1`;
 +
-diff -r 6eeee157fd40 patch_info/innodb_dict_size_limit.info
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/patch_info/innodb_dict_size_limit.info	Fri Jul 03 15:41:41 2009 -0700
+diff -ruN a/patch_info/innodb_dict_size_limit.info b/patch_info/innodb_dict_size_limit.info
+--- /dev/null	1970-01-01 09:00:00.000000000 +0900
++++ b/patch_info/innodb_dict_size_limit.info	2009-08-27 18:42:59.000000000 +0900
 @@ -0,0 +1,9 @@
 +File=innodb_dict_size_limit.patch
 +Name=Limit dictionary cache size
@@ -408,9 +558,9 @@ diff -r 6eeee157fd40 patch_info/innodb_dict_size_limit.info
 +ChangeLog=
 +2009-01-26
 +YK: Initial release
-diff -r 6eeee157fd40 sql/ha_innodb.cc
---- a/sql/ha_innodb.cc	Fri Jul 03 15:41:34 2009 -0700
-+++ b/sql/ha_innodb.cc	Fri Jul 03 15:41:41 2009 -0700
+diff -ruN a/sql/ha_innodb.cc b/sql/ha_innodb.cc
+--- a/sql/ha_innodb.cc	2009-08-27 18:42:17.000000000 +0900
++++ b/sql/ha_innodb.cc	2009-08-27 18:42:59.000000000 +0900
 @@ -288,6 +288,8 @@
    (char*) &export_vars.innodb_dblwr_pages_written,        SHOW_LONG},
    {"dblwr_writes",
@@ -420,9 +570,9 @@ diff -r 6eeee157fd40 sql/ha_innodb.cc
    {"log_waits",
    (char*) &export_vars.innodb_log_waits,                  SHOW_LONG},
    {"log_write_requests",
-diff -r 6eeee157fd40 sql/ha_innodb.h
---- a/sql/ha_innodb.h	Fri Jul 03 15:41:34 2009 -0700
-+++ b/sql/ha_innodb.h	Fri Jul 03 15:41:41 2009 -0700
+diff -ruN a/sql/ha_innodb.h b/sql/ha_innodb.h
+--- a/sql/ha_innodb.h	2009-08-27 18:42:17.000000000 +0900
++++ b/sql/ha_innodb.h	2009-08-27 18:42:59.000000000 +0900
 @@ -243,6 +243,7 @@
  extern ulong srv_enable_unsafe_group_commit;
  extern uint srv_read_ahead;
@@ -431,9 +581,9 @@ diff -r 6eeee157fd40 sql/ha_innodb.h
  extern ulong srv_show_locks_held;
  extern ulong srv_show_verbose_locks;
  extern ulong srv_io_pattern_trace;
-diff -r 6eeee157fd40 sql/mysqld.cc
---- a/sql/mysqld.cc	Fri Jul 03 15:41:34 2009 -0700
-+++ b/sql/mysqld.cc	Fri Jul 03 15:41:41 2009 -0700
+diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
+--- a/sql/mysqld.cc	2009-08-27 18:42:17.000000000 +0900
++++ b/sql/mysqld.cc	2009-08-27 18:42:59.000000000 +0900
 @@ -5101,6 +5101,7 @@
    OPT_INNODB_ADAPTIVE_CHECKPOINT,
    OPT_INNODB_READ_IO_THREADS,
@@ -453,9 +603,9 @@ diff -r 6eeee157fd40 sql/mysqld.cc
    {"innodb_io_pattern_trace", OPT_INNODB_IO_PATTERN_TRACE,
     "Create/Drop the internal hash table for IO pattern tracing.",
     (gptr*) &srv_io_pattern_trace, (gptr*) &srv_io_pattern_trace,
-diff -r 6eeee157fd40 sql/set_var.cc
---- a/sql/set_var.cc	Fri Jul 03 15:41:34 2009 -0700
-+++ b/sql/set_var.cc	Fri Jul 03 15:41:41 2009 -0700
+diff -ruN a/sql/set_var.cc b/sql/set_var.cc
+--- a/sql/set_var.cc	2009-08-27 18:42:17.000000000 +0900
++++ b/sql/set_var.cc	2009-08-27 18:42:59.000000000 +0900
 @@ -540,6 +540,8 @@
  sys_var_enum	sys_innodb_adaptive_checkpoint("innodb_adaptive_checkpoint",
                             &srv_adaptive_checkpoint,
diff --git a/mysql-innodb_misc_patch.patch b/mysql-innodb_misc_patch.patch
new file mode 100644
index 0000000..4f4faf3
--- /dev/null
+++ b/mysql-innodb_misc_patch.patch
@@ -0,0 +1,64 @@
+diff -ru mysql-5.0.84_p_orig/innobase/row/row0sel.c mysql-5.0.84/innobase/row/row0sel.c
+--- mysql-5.0.84_p_orig/innobase/row/row0sel.c	2009-07-07 21:54:10.000000000 +0900
++++ mysql-5.0.84/innobase/row/row0sel.c	2009-08-28 09:28:56.000000000 +0900
+@@ -2988,6 +2988,15 @@
+ 	return(SEL_FOUND);
+ }
+ 
++/**********************************************************************
++Returns true if the thread is executing a SELECT statement.
++(Prototype for global functions in ha_innodb.cc) */
++ibool
++thd_is_select(
++/*==========*/
++				/* out: true if thd is executing SELECT */
++	const void*	thd);	/* in: thread handle (THD*) */
++
+ /************************************************************************
+ Searches for rows in the database. This is used in the interface to
+ MySQL. This function opens a cursor, and also implements fetch next
+@@ -3361,20 +3370,12 @@
+ 
+ 	if (trx->isolation_level <= TRX_ISO_READ_COMMITTED
+ 	    && prebuilt->select_lock_type != LOCK_NONE
+-	    && trx->mysql_query_str) {
+-
+-		/* Scan the MySQL query string; check if SELECT is the first
+-	        word there */
+-		ibool	success;
+-
+-		dict_accept(*trx->mysql_query_str, "SELECT", &success);
+-
+-		if (success) {
++	    && trx->mysql_thd != NULL
++	    && thd_is_select(trx->mysql_thd)) {
+ 			/* It is a plain locking SELECT and the isolation
+ 			level is low: do not lock gaps */
+ 
+ 			set_also_gap_locks = FALSE;
+-		}
+ 	}
+ 	
+ 	/* Note that if the search mode was GE or G, then the cursor
+diff -ru mysql-5.0.84_p_orig/sql/ha_innodb.cc mysql-5.0.84/sql/ha_innodb.cc
+--- mysql-5.0.84_p_orig/sql/ha_innodb.cc	2009-08-27 16:06:21.000000000 +0900
++++ mysql-5.0.84/sql/ha_innodb.cc	2009-08-28 09:33:38.000000000 +0900
+@@ -394,6 +394,18 @@
+ 	}
+ }
+ 
++/**********************************************************************
++Returns true if the thread is executing a SELECT statement. */
++extern "C"
++ibool
++thd_is_select(
++/*==========*/
++				/* out: true if thd is executing SELECT */
++	const void*	thd)	/* in: thread handle (THD*) */
++{
++	return(((const THD*) thd)->lex->sql_command == SQLCOM_SELECT);
++}
++
+ /************************************************************************
+ Call this function when mysqld passes control to the client. That is to
+ avoid deadlocks on the adaptive hash S-latch possibly held by thd. For more
diff --git a/mysql-innodb_split_buf_pool_mutex.patch b/mysql-innodb_split_buf_pool_mutex.patch
index 7fa7ac0..11a39c5 100644
--- a/mysql-innodb_split_buf_pool_mutex.patch
+++ b/mysql-innodb_split_buf_pool_mutex.patch
@@ -1,6 +1,27 @@
-diff -r 7ac364cc9b41 innobase/buf/buf0buf.c
---- a/innobase/buf/buf0buf.c	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/buf/buf0buf.c	Fri Jul 03 15:41:57 2009 -0700
+diff -ruN a/innobase/btr/btr0sea.c b/innobase/btr/btr0sea.c
+--- a/innobase/btr/btr0sea.c	2009-08-28 11:08:16.000000000 +0900
++++ b/innobase/btr/btr0sea.c	2009-08-28 11:06:20.000000000 +0900
+@@ -1101,7 +1101,7 @@
+ 	ulint*		offsets;
+ 
+ 	rw_lock_x_lock(&btr_search_latch);
+-	mutex_enter(&buf_pool->mutex);
++	mutex_enter(&buf_pool->LRU_mutex);
+ 
+ 	table = btr_search_sys->hash_index;
+ 
+@@ -1186,7 +1186,7 @@
+ 		block = UT_LIST_GET_PREV(LRU, block);
+ 	}
+ 
+-	mutex_exit(&buf_pool->mutex);
++	mutex_exit(&buf_pool->LRU_mutex);
+ 	rw_lock_x_unlock(&btr_search_latch);
+ 
+ 	if (UNIV_LIKELY_NULL(heap)) {
+diff -ruN a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c
+--- a/innobase/buf/buf0buf.c	2009-08-28 11:08:16.000000000 +0900
++++ b/innobase/buf/buf0buf.c	2009-08-28 11:06:30.000000000 +0900
 @@ -549,6 +549,17 @@
  	mutex_create(&(buf_pool->mutex));
  	mutex_set_level(&(buf_pool->mutex), SYNC_BUF_POOL);
@@ -377,7 +398,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0buf.c
  #ifdef UNIV_DEBUG
  		if (buf_debug_prints) {
  			fputs("Has read ", stderr);
-@@ -2103,10 +2136,23 @@
+@@ -2103,11 +2136,24 @@
  	} else {
  		ut_ad(io_type == BUF_IO_WRITE);
  
@@ -394,13 +415,14 @@ diff -r 7ac364cc9b41 innobase/buf/buf0buf.c
  		routine in the flush system */
  
  		buf_flush_write_complete(block);
-+
+ 
 +		if (flush_type == BUF_FLUSH_LRU) {
 +			mutex_exit(&(buf_pool->LRU_mutex));
 +		}
- 
++
  		rw_lock_s_unlock_gen(&(block->lock), BUF_IO_WRITE);
  		/* io_counter here */
+ 		if (srv_io_pattern && srv_io_pattern_trace_running) {
 @@ -2132,6 +2178,9 @@
  
  		buf_pool->n_pages_written++;
@@ -587,9 +609,9 @@ diff -r 7ac364cc9b41 innobase/buf/buf0buf.c
  
  	return(len);
  }
-diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
---- a/innobase/buf/buf0flu.c	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/buf/buf0flu.c	Fri Jul 03 15:41:57 2009 -0700
+diff -ruN a/innobase/buf/buf0flu.c b/innobase/buf/buf0flu.c
+--- a/innobase/buf/buf0flu.c	2009-08-28 11:08:17.000000000 +0900
++++ b/innobase/buf/buf0flu.c	2009-08-28 11:06:30.000000000 +0900
 @@ -49,7 +49,9 @@
  	buf_block_t*	block)	/* in: block which is modified */
  {
@@ -612,7 +634,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  #endif /* UNIV_SYNC_DEBUG */
  
  	prev_b = NULL;
-@@ -113,16 +117,18 @@
+@@ -130,16 +134,18 @@
  				BUF_BLOCK_FILE_PAGE and in the LRU list */
  {
  #ifdef UNIV_SYNC_DEBUG
@@ -634,7 +656,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  		return(FALSE);
  	}
  
-@@ -148,12 +154,13 @@
+@@ -165,12 +171,13 @@
  	ulint		flush_type)/* in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */
  {
  #ifdef UNIV_SYNC_DEBUG
@@ -651,7 +673,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  	    					&& (block->io_fix == 0)) {
  	    	if (flush_type != BUF_FLUSH_LRU) {
  
-@@ -182,15 +189,17 @@
+@@ -199,15 +206,17 @@
  {
  	ut_ad(block);
  #ifdef UNIV_SYNC_DEBUG
@@ -670,7 +692,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  
  	(buf_pool->n_flush[block->flush_type])--;
  
-@@ -536,18 +545,20 @@
+@@ -553,18 +562,20 @@
  	ut_ad(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST
  				|| flush_type == BUF_FLUSH_SINGLE_PAGE);
  
@@ -693,7 +715,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  
  	if (flush_type == BUF_FLUSH_LIST
  	    && buf_flush_ready_for_flush(block, flush_type)) {
-@@ -744,7 +755,7 @@
+@@ -761,7 +772,7 @@
  		high = fil_space_get_size(space);
  	}
  
@@ -702,7 +724,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  
  	for (i = low; i < high; i++) {
  
-@@ -778,7 +789,7 @@
+@@ -795,7 +806,7 @@
  
  				mutex_exit(&block->mutex);
  
@@ -711,7 +733,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  
  				/* Note: as we release the buf_pool mutex
  				above, in buf_flush_try_page we cannot be sure
-@@ -789,14 +800,14 @@
+@@ -806,14 +817,14 @@
  				count += buf_flush_try_page(space, i,
  							    flush_type);
  
@@ -728,7 +750,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  
  	return(count);
  }
-@@ -831,6 +842,7 @@
+@@ -848,6 +859,7 @@
  	ulint		space;
  	ulint		offset;
  	ibool		found;
@@ -736,7 +758,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  	
  	ut_ad((flush_type == BUF_FLUSH_LRU)
  					|| (flush_type == BUF_FLUSH_LIST)); 
-@@ -849,6 +861,12 @@
+@@ -866,6 +878,12 @@
  	}
  
  	(buf_pool->init_flush)[flush_type] = TRUE;
@@ -749,7 +771,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  	
  	for (;;) {
  		/* If we have flushed enough, leave the loop */
-@@ -865,7 +883,10 @@
+@@ -882,7 +900,10 @@
  	    	} else {
  			ut_ad(flush_type == BUF_FLUSH_LIST);
  
@@ -760,7 +782,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  			if (!block
  			    || (ut_dulint_cmp(block->oldest_modification,
  			    				lsn_limit) >= 0)) {
-@@ -895,7 +916,9 @@
+@@ -912,7 +933,9 @@
  				offset = block->offset;
  	    
  				mutex_exit(&block->mutex);
@@ -771,7 +793,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  
  				old_page_count = page_count;
  				
-@@ -915,7 +938,9 @@
+@@ -932,7 +955,9 @@
  				flush_type, offset,
  				page_count - old_page_count); */
  
@@ -782,7 +804,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  
  			} else if (flush_type == BUF_FLUSH_LRU) {
  
-@@ -927,16 +952,25 @@
+@@ -944,17 +969,26 @@
  
  				mutex_exit(&block->mutex);
  
@@ -800,16 +822,17 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  	    		break;
  	    	}
  	}
-+
+ 
 +	if (flush_type == BUF_FLUSH_LRU) {
 +		mutex_exit(&(buf_pool->LRU_mutex));
 +	}
 +
 +	mutex_enter(&(buf_pool->mutex));
- 
++
  	(buf_pool->init_flush)[flush_type] = FALSE;
  
-@@ -997,7 +1031,7 @@
+ 	if ((buf_pool->n_flush[flush_type] == 0)
+@@ -1014,7 +1048,7 @@
  	ulint		n_replaceable;
  	ulint		distance	= 0;
  	
@@ -818,20 +841,20 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  
  	n_replaceable = UT_LIST_GET_LEN(buf_pool->free);
  
-@@ -1007,6 +1041,12 @@
- 	       && (n_replaceable < BUF_FLUSH_FREE_BLOCK_MARGIN
+@@ -1025,6 +1059,12 @@
  	       				+ BUF_FLUSH_EXTRA_MARGIN)
  	       && (distance < BUF_LRU_FREE_SEARCH_LEN)) {
-+
+ 
 +		if (!block->in_LRU_list) {
 +			/* reatart. but it is very optimistic */
 +			block = UT_LIST_GET_LAST(buf_pool->LRU);
 +			continue;
 +		}
- 
++
  		mutex_enter(&block->mutex);
  
-@@ -1021,7 +1061,7 @@
+ 		if (buf_flush_ready_for_replace(block)) {
+@@ -1038,7 +1078,7 @@
  		block = UT_LIST_GET_PREV(LRU, block);
  	}
  	
@@ -840,7 +863,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  
  	if (n_replaceable >= BUF_FLUSH_FREE_BLOCK_MARGIN) {
  
-@@ -1040,8 +1080,9 @@
+@@ -1057,8 +1097,9 @@
  immediately, without waiting. */ 
  
  void
@@ -851,7 +874,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  {
  	ulint	n_to_flush;
  	ulint	n_flushed;
-@@ -1051,7 +1092,7 @@
+@@ -1068,7 +1109,7 @@
  	if (n_to_flush > 0) {
  		n_flushed = buf_flush_batch(BUF_FLUSH_LRU, n_to_flush,
  							ut_dulint_zero);
@@ -860,7 +883,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  			/* There was an LRU type flush batch already running;
  			let us wait for it to end */
  		   
-@@ -1101,11 +1142,11 @@
+@@ -1118,11 +1159,11 @@
  {
  	ibool	ret;
  	
@@ -874,9 +897,9 @@ diff -r 7ac364cc9b41 innobase/buf/buf0flu.c
  
  	return(ret);
  }
-diff -r 7ac364cc9b41 innobase/buf/buf0lru.c
---- a/innobase/buf/buf0lru.c	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/buf/buf0lru.c	Fri Jul 03 15:41:57 2009 -0700
+diff -ruN a/innobase/buf/buf0lru.c b/innobase/buf/buf0lru.c
+--- a/innobase/buf/buf0lru.c	2009-07-07 21:53:57.000000000 +0900
++++ b/innobase/buf/buf0lru.c	2009-08-28 11:06:30.000000000 +0900
 @@ -108,7 +108,7 @@
  
  	page_arr = ut_malloc(sizeof(ulint)
@@ -1242,10 +1265,10 @@ diff -r 7ac364cc9b41 innobase/buf/buf0lru.c
 -	mutex_exit(&(buf_pool->mutex));
 +	mutex_exit(&(buf_pool->LRU_mutex));
  }
-diff -r 7ac364cc9b41 innobase/buf/buf0rea.c
---- a/innobase/buf/buf0rea.c	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/buf/buf0rea.c	Fri Jul 03 15:41:57 2009 -0700
-@@ -237,10 +237,12 @@
+diff -ruN a/innobase/buf/buf0rea.c b/innobase/buf/buf0rea.c
+--- a/innobase/buf/buf0rea.c	2009-08-28 11:08:17.000000000 +0900
++++ b/innobase/buf/buf0rea.c	2009-08-28 11:06:30.000000000 +0900
+@@ -277,10 +277,12 @@
  
  		return(0);
  	}	
@@ -1258,7 +1281,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0rea.c
  	for (i = low; i < high; i++) {
  		block = buf_page_hash_get(space, i);
  
-@@ -252,7 +254,7 @@
+@@ -292,7 +294,7 @@
  		}
  	}
  
@@ -1267,7 +1290,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0rea.c
  	
  	if (recent_blocks < BUF_READ_AHEAD_RANDOM_THRESHOLD) {
  		/* Do nothing */
-@@ -348,7 +350,7 @@
+@@ -388,7 +390,7 @@
  	}
  
  	/* Flush pages from the end of the LRU list if necessary */
@@ -1276,7 +1299,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0rea.c
  
  	return(count + count2);
  }
-@@ -451,6 +453,7 @@
+@@ -491,6 +493,7 @@
  
  		return(0);
  	}	
@@ -1284,7 +1307,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0rea.c
  
  	/* Check that almost all pages in the area have been accessed; if
  	offset == low, the accesses must be in a descending order, otherwise,
-@@ -464,6 +467,7 @@
+@@ -504,6 +507,7 @@
  
  	fail_count = 0;
  
@@ -1292,7 +1315,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0rea.c
  	for (i = low; i < high; i++) {
  		block = buf_page_hash_get(space, i);
  		
-@@ -480,12 +484,11 @@
+@@ -520,23 +524,23 @@
  			pred_block = block;
  		}
  	}
@@ -1301,12 +1324,12 @@ diff -r 7ac364cc9b41 innobase/buf/buf0rea.c
  	if (fail_count > BUF_READ_AHEAD_LINEAR_AREA -
  			 BUF_READ_AHEAD_LINEAR_THRESHOLD) {
  		/* Too many failures: return */
--
--		mutex_exit(&(buf_pool->mutex));
  
+-		mutex_exit(&(buf_pool->mutex));
+-
  		return(0);
  	}
-@@ -493,10 +496,11 @@
+ 
  	/* If we got this far, we know that enough pages in the area have
  	been accessed in the right order: linear read-ahead can be sensible */
  
@@ -1319,7 +1342,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0rea.c
  
  		return(0);
  	}
-@@ -512,7 +516,7 @@
+@@ -552,7 +556,7 @@
  	pred_offset = fil_page_get_prev(frame);
  	succ_offset = fil_page_get_next(frame);
  
@@ -1328,7 +1351,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0rea.c
  	
  	if ((offset == low) && (succ_offset == offset + 1)) {
  
-@@ -588,7 +592,7 @@
+@@ -628,7 +632,7 @@
  	os_aio_simulated_wake_handler_threads();
  
  	/* Flush pages from the end of the LRU list if necessary */
@@ -1337,7 +1360,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0rea.c
  
  #ifdef UNIV_DEBUG
  	if (buf_debug_prints && (count > 0)) {
-@@ -656,7 +660,7 @@
+@@ -696,7 +700,7 @@
  	os_aio_simulated_wake_handler_threads();
  
  	/* Flush pages from the end of the LRU list if necessary */
@@ -1346,7 +1369,7 @@ diff -r 7ac364cc9b41 innobase/buf/buf0rea.c
  
  #ifdef UNIV_DEBUG
  	if (buf_debug_prints) {
-@@ -728,7 +732,7 @@
+@@ -768,7 +772,7 @@
  	os_aio_simulated_wake_handler_threads();
  
  	/* Flush pages from the end of the LRU list if necessary */
@@ -1355,9 +1378,9 @@ diff -r 7ac364cc9b41 innobase/buf/buf0rea.c
  
  #ifdef UNIV_DEBUG
  	if (buf_debug_prints) {
-diff -r 7ac364cc9b41 innobase/include/buf0buf.h
---- a/innobase/include/buf0buf.h	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/include/buf0buf.h	Fri Jul 03 15:41:57 2009 -0700
+diff -ruN a/innobase/include/buf0buf.h b/innobase/include/buf0buf.h
+--- a/innobase/include/buf0buf.h	2009-08-28 11:08:16.000000000 +0900
++++ b/innobase/include/buf0buf.h	2009-08-28 11:06:30.000000000 +0900
 @@ -946,6 +946,7 @@
  	mem_heap_t*	io_counter_heap;
  	ulint		io_counters;
@@ -1385,9 +1408,9 @@ diff -r 7ac364cc9b41 innobase/include/buf0buf.h
  	buf_block_t*	LRU_old; 	/* pointer to the about 3/8 oldest
  					blocks in the LRU list; NULL if LRU
  					length less than BUF_LRU_OLD_MIN_LEN */
-diff -r 7ac364cc9b41 innobase/include/buf0buf.ic
---- a/innobase/include/buf0buf.ic	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/include/buf0buf.ic	Fri Jul 03 15:41:57 2009 -0700
+diff -ruN a/innobase/include/buf0buf.ic b/innobase/include/buf0buf.ic
+--- a/innobase/include/buf0buf.ic	2009-07-07 21:54:00.000000000 +0900
++++ b/innobase/include/buf0buf.ic	2009-08-28 11:06:30.000000000 +0900
 @@ -112,7 +112,8 @@
  	buf_block_t*	block;
  	dulint		lsn;
@@ -1505,9 +1528,9 @@ diff -r 7ac364cc9b41 innobase/include/buf0buf.ic
  
  	mutex_enter(&block->mutex);
  
-diff -r 7ac364cc9b41 innobase/include/buf0flu.h
---- a/innobase/include/buf0flu.h	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/include/buf0flu.h	Fri Jul 03 15:41:57 2009 -0700
+diff -ruN a/innobase/include/buf0flu.h b/innobase/include/buf0flu.h
+--- a/innobase/include/buf0flu.h	2009-07-07 21:54:00.000000000 +0900
++++ b/innobase/include/buf0flu.h	2009-08-28 11:06:30.000000000 +0900
 @@ -26,8 +26,9 @@
  a margin of replaceable pages there. */
  
@@ -1519,9 +1542,9 @@ diff -r 7ac364cc9b41 innobase/include/buf0flu.h
  /************************************************************************
  Initializes a page for writing to the tablespace. */
  
-diff -r 7ac364cc9b41 innobase/include/buf0flu.ic
---- a/innobase/include/buf0flu.ic	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/include/buf0flu.ic	Fri Jul 03 15:41:57 2009 -0700
+diff -ruN a/innobase/include/buf0flu.ic b/innobase/include/buf0flu.ic
+--- a/innobase/include/buf0flu.ic	2009-07-07 21:54:00.000000000 +0900
++++ b/innobase/include/buf0flu.ic	2009-08-28 11:06:30.000000000 +0900
 @@ -38,11 +38,14 @@
  	mtr_t*		mtr)	/* in: mtr */
  {
@@ -1538,7 +1561,7 @@ diff -r 7ac364cc9b41 innobase/include/buf0flu.ic
  #endif /* UNIV_SYNC_DEBUG */
  
  	ut_ad(ut_dulint_cmp(mtr->start_lsn, ut_dulint_zero) != 0);
-@@ -52,15 +55,19 @@
+@@ -52,16 +55,20 @@
  	block->newest_modification = mtr->end_lsn;
  
  	if (ut_dulint_is_zero(block->oldest_modification)) {
@@ -1553,11 +1576,12 @@ diff -r 7ac364cc9b41 innobase/include/buf0flu.ic
  		ut_ad(ut_dulint_cmp(block->oldest_modification,
  							mtr->start_lsn) <= 0);
  	}
-+
-+	mutex_exit(&block->mutex);
  
++	mutex_exit(&block->mutex);
++
          ++srv_buf_pool_write_requests;
  }
+ 
 @@ -78,29 +85,32 @@
  					set of mtr's */
  {
@@ -1594,9 +1618,9 @@ diff -r 7ac364cc9b41 innobase/include/buf0flu.ic
 -	mutex_exit(&(buf_pool->mutex));
 +	mutex_exit(&(block->mutex));
  }
-diff -r 7ac364cc9b41 innobase/include/sync0sync.h
---- a/innobase/include/sync0sync.h	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/include/sync0sync.h	Fri Jul 03 15:41:57 2009 -0700
+diff -ruN a/innobase/include/sync0sync.h b/innobase/include/sync0sync.h
+--- a/innobase/include/sync0sync.h	2009-07-07 21:54:06.000000000 +0900
++++ b/innobase/include/sync0sync.h	2009-08-28 11:06:30.000000000 +0900
 @@ -438,8 +438,12 @@
  					SYNC_SEARCH_SYS, as memory allocation
  					can call routines there! Otherwise
@@ -1611,10 +1635,10 @@ diff -r 7ac364cc9b41 innobase/include/sync0sync.h
  #define SYNC_DOUBLEWRITE	140
  #define	SYNC_ANY_LATCH		135
  #define SYNC_THR_LOCAL		133
-diff -r 7ac364cc9b41 innobase/log/log0recv.c
---- a/innobase/log/log0recv.c	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/log/log0recv.c	Fri Jul 03 15:41:57 2009 -0700
-@@ -1693,11 +1693,11 @@
+diff -ruN a/innobase/log/log0recv.c b/innobase/log/log0recv.c
+--- a/innobase/log/log0recv.c	2009-08-28 11:08:17.000000000 +0900
++++ b/innobase/log/log0recv.c	2009-08-28 11:06:30.000000000 +0900
+@@ -1695,11 +1695,11 @@
  
  	mtr_start(&mtr);
  
@@ -1628,9 +1652,9 @@ diff -r 7ac364cc9b41 innobase/log/log0recv.c
  
  	replica = buf_page_get(space + RECV_REPLICA_SPACE_ADD, page_no,
  							RW_X_LATCH, &mtr);
-diff -r 7ac364cc9b41 innobase/mtr/mtr0mtr.c
---- a/innobase/mtr/mtr0mtr.c	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/mtr/mtr0mtr.c	Fri Jul 03 15:41:57 2009 -0700
+diff -ruN a/innobase/mtr/mtr0mtr.c b/innobase/mtr/mtr0mtr.c
+--- a/innobase/mtr/mtr0mtr.c	2009-07-07 21:54:08.000000000 +0900
++++ b/innobase/mtr/mtr0mtr.c	2009-08-28 11:06:30.000000000 +0900
 @@ -103,6 +103,38 @@
  	}
  }
@@ -1679,7 +1703,7 @@ diff -r 7ac364cc9b41 innobase/mtr/mtr0mtr.c
  	}
  
  	/* We first update the modification info to buffer pages, and only
-@@ -187,11 +221,12 @@
+@@ -187,12 +221,13 @@
  	required when we insert modified buffer pages in to the flush list
  	which must be sorted on oldest_modification. */
  	
@@ -1688,12 +1712,13 @@ diff -r 7ac364cc9b41 innobase/mtr/mtr0mtr.c
  	if (mtr->modifications) {
  		log_release();
  	}
-+
+ 
 +	/* All unlocking has been moved here, after log_sys mutex release. */
 +	mtr_memo_pop_all(mtr);
- 
++
  #ifdef UNIV_DEBUG
  	mtr->state = MTR_COMMITTED;
+ #endif
 @@ -262,6 +297,12 @@
  		slot = dyn_array_get_element(memo, offset);
  
@@ -1707,10 +1732,10 @@ diff -r 7ac364cc9b41 innobase/mtr/mtr0mtr.c
  
  			mtr_memo_slot_release(mtr, slot);
  
-diff -r 7ac364cc9b41 innobase/srv/srv0srv.c
---- a/innobase/srv/srv0srv.c	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/srv/srv0srv.c	Fri Jul 03 15:41:57 2009 -0700
-@@ -367,6 +367,7 @@
+diff -ruN a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
+--- a/innobase/srv/srv0srv.c	2009-08-28 11:08:17.000000000 +0900
++++ b/innobase/srv/srv0srv.c	2009-08-28 11:06:30.000000000 +0900
+@@ -370,6 +370,7 @@
  ulong	srv_n_free_tickets_to_enter = 500;
  ulong	srv_thread_sleep_delay = 10000;
  ulint	srv_spin_wait_delay	= 5;
@@ -1718,7 +1743,7 @@ diff -r 7ac364cc9b41 innobase/srv/srv0srv.c
  ibool	srv_priority_boost	= TRUE;
  
  ibool	srv_print_thread_releases	= FALSE;
-@@ -673,6 +674,47 @@
+@@ -676,6 +677,47 @@
  ulint	srv_n_threads_active[SRV_MASTER + 1];
  ulint	srv_n_threads[SRV_MASTER + 1];
  
@@ -1766,16 +1791,16 @@ diff -r 7ac364cc9b41 innobase/srv/srv0srv.c
  /*************************************************************************
  Sets the info describing an i/o thread current state. */
  
-@@ -905,6 +947,8 @@
- 	srv_slot_t*		slot;
+@@ -909,6 +951,8 @@
  	dict_table_t*		table;
  	ulint			i;
-+
-+	srv_align_spins_microsec();
  
++	srv_align_spins_microsec();
++
  	srv_sys = mem_alloc(sizeof(srv_sys_t));
  
-@@ -2661,7 +2705,7 @@
+ 	kernel_mutex_temp = mem_alloc(sizeof(mutex_t));
+@@ -2665,7 +2709,7 @@
  					ib_longlong level, bpl;
  					buf_block_t* bpage;
  
@@ -1784,7 +1809,7 @@ diff -r 7ac364cc9b41 innobase/srv/srv0srv.c
  
  					level = 0;
  					bpage = UT_LIST_GET_FIRST(buf_pool->flush_list);
-@@ -2683,7 +2727,7 @@
+@@ -2687,7 +2731,7 @@
  						bpl = 0;
  					}
  
@@ -1793,9 +1818,9 @@ diff -r 7ac364cc9b41 innobase/srv/srv0srv.c
  
  					if (!srv_use_doublewrite_buf) {
  						/* flush is faster than when doublewrite */
-diff -r 7ac364cc9b41 innobase/sync/sync0sync.c
---- a/innobase/sync/sync0sync.c	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/sync/sync0sync.c	Fri Jul 03 15:41:57 2009 -0700
+diff -ruN a/innobase/sync/sync0sync.c b/innobase/sync/sync0sync.c
+--- a/innobase/sync/sync0sync.c	2009-07-07 21:54:10.000000000 +0900
++++ b/innobase/sync/sync0sync.c	2009-08-28 11:06:30.000000000 +0900
 @@ -1105,11 +1105,19 @@
  	} else if (level == SYNC_DOUBLEWRITE) {
  		ut_a(sync_thread_levels_g(array, SYNC_DOUBLEWRITE));
@@ -1817,9 +1842,9 @@ diff -r 7ac364cc9b41 innobase/sync/sync0sync.c
  	} else if (level == SYNC_SEARCH_SYS) {
  		ut_a(sync_thread_levels_g(array, SYNC_SEARCH_SYS));
  	} else if (level == SYNC_TRX_LOCK_HEAP) {
-diff -r 7ac364cc9b41 innobase/ut/ut0ut.c
---- a/innobase/ut/ut0ut.c	Fri Jul 03 15:41:50 2009 -0700
-+++ b/innobase/ut/ut0ut.c	Fri Jul 03 15:41:57 2009 -0700
+diff -ruN a/innobase/ut/ut0ut.c b/innobase/ut/ut0ut.c
+--- a/innobase/ut/ut0ut.c	2009-07-07 21:54:12.000000000 +0900
++++ b/innobase/ut/ut0ut.c	2009-08-28 11:06:30.000000000 +0900
 @@ -347,6 +347,7 @@
  /*****************************************************************
  Runs an idle loop on CPU. The argument gives the desired delay
@@ -1841,9 +1866,9 @@ diff -r 7ac364cc9b41 innobase/ut/ut0ut.c
  		j += i;
  	}
  
-diff -r 7ac364cc9b41 patch_info/innodb_split_buf_pool_mutex.info
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/patch_info/innodb_split_buf_pool_mutex.info	Fri Jul 03 15:41:57 2009 -0700
+diff -ruN a/patch_info/innodb_split_buf_pool_mutex.info b/patch_info/innodb_split_buf_pool_mutex.info
+--- /dev/null	1970-01-01 09:00:00.000000000 +0900
++++ b/patch_info/innodb_split_buf_pool_mutex.info	2009-08-28 11:06:30.000000000 +0900
 @@ -0,0 +1,6 @@
 +File=innodb_split_buf_pool_mutex.patch
 +Name=InnoDB patch to fix buffer pool scalability
@@ -1851,10 +1876,10 @@ diff -r 7ac364cc9b41 patch_info/innodb_split_buf_pool_mutex.info
 +Author=Yasufumi Kinoshita
 +License=BSD
 +Comment=Backport from XtraDB
-diff -r 7ac364cc9b41 sql/ha_innodb.cc
---- a/sql/ha_innodb.cc	Fri Jul 03 15:41:50 2009 -0700
-+++ b/sql/ha_innodb.cc	Fri Jul 03 15:41:57 2009 -0700
-@@ -1503,6 +1503,13 @@
+diff -ruN a/sql/ha_innodb.cc b/sql/ha_innodb.cc
+--- a/sql/ha_innodb.cc	2009-08-28 11:08:17.000000000 +0900
++++ b/sql/ha_innodb.cc	2009-08-28 11:06:30.000000000 +0900
+@@ -1507,6 +1507,13 @@
          /* We set srv_pool_size here in units of 1 kB. InnoDB internally
          changes the value so that it becomes the number of database pages. */
  
diff --git a/mysql-userstatv2.patch b/mysql-userstatv2.patch
index 78625a6..fc421b0 100644
--- a/mysql-userstatv2.patch
+++ b/mysql-userstatv2.patch
@@ -3797,7 +3797,7 @@ diff -r 592f6c3641ba sql/sql_show.cc
  
 +ST_FIELD_INFO user_stats_fields_info[]=
 +{
-+  {"USER", 16, MYSQL_TYPE_STRING, 0, 0, "User"},
++  {"USER", USERNAME_LENGTH, MYSQL_TYPE_STRING, 0, 0, "User"},
 +  {"TOTAL_CONNECTIONS", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG, 0, 0, "Total_connections"},
 +  {"CONCURRENT_CONNECTIONS", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG, 0, 0, "Concurrent_connections"},
 +  {"CONNECTED_TIME", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG, 0, 0, "Connected_time"},
================================================================

---- gitweb:

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




More information about the pld-cvs-commit mailing list