List:Commits« Previous MessageNext Message »
From:kent Date:March 30 2006 8:10am
Subject:bk commit into 5.0 tree (kent:1.2116)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of kent. When kent does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2116 06/03/30 08:10:03 kent@stripped +1 -0
  btr0sea.c:
    Added BTR_CHUNK_SIZE, removed 'chunk_size' declared after declaration block

  innobase/btr/btr0sea.c
    1.40 06/03/30 08:08:44 kent@stripped +6 -7
    Added BTR_CHUNK_SIZE, removed 'chunk_size' declared after declaration block

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	kent
# Host:	c-4d4072d5.010-2112-6f72651.cust.bredbandsbolaget.se
# Root:	/Users/kent/mysql/bk/mysql-5.0-release

--- 1.39/innobase/btr/btr0sea.c	2006-03-29 21:04:26 +02:00
+++ 1.40/innobase/btr/btr0sea.c	2006-03-30 08:08:44 +02:00
@@ -59,6 +59,9 @@
 
 #define BTR_SEARCH_BUILD_LIMIT		100
 
+/* How many cells to check before temporarily releasing btr_search_latch */
+#define BTR_CHUNK_SIZE			10000
+
 /************************************************************************
 Builds a hash index on a page with the given parameters. If the page already
 has a hash index with different parameters, the old hash index is removed.
@@ -1606,10 +1609,6 @@
 	ulint*		offsets		= offsets_;
 	*offsets_ = (sizeof offsets_) / sizeof *offsets_;
 
-	/* How many cells to check before temporarily releasing
-	btr_search_latch. */
-	ulint		chunk_size = 10000;
-	
 	rw_lock_x_lock(&btr_search_latch);
 
 	cell_count = hash_get_n_cells(btr_search_sys->hash_index);
@@ -1617,7 +1616,7 @@
 	for (i = 0; i < cell_count; i++) {
 		/* We release btr_search_latch every once in a while to
 		give other queries a chance to run. */
-		if ((i != 0) && ((i % chunk_size) == 0)) {
+		if ((i != 0) && ((i % BTR_CHUNK_SIZE) == 0)) {
 			rw_lock_x_unlock(&btr_search_latch);
 			os_thread_yield();
 			rw_lock_x_lock(&btr_search_latch);
@@ -1676,8 +1675,8 @@
 		}
 	}
 
-	for (i = 0; i < cell_count; i += chunk_size) {
-		ulint end_index = ut_min(i + chunk_size - 1, cell_count - 1);
+	for (i = 0; i < cell_count; i += BTR_CHUNK_SIZE) {
+		ulint end_index = ut_min(i + BTR_CHUNK_SIZE - 1, cell_count - 1);
 		
 		/* We release btr_search_latch every once in a while to
 		give other queries a chance to run. */
Thread
bk commit into 5.0 tree (kent:1.2116)kent30 Mar