List:Commits« Previous MessageNext Message »
From:vasil.dimov Date:February 21 2011 10:26am
Subject:bzr commit into mysql-trunk branch (vasil.dimov:3686)
View as plain text  
#At file:///usr/local/devel/bzrroot/server/mysql-trunk/ based on revid:tor.didriksen@stripped

 3686 Vasil Dimov	2011-02-21 [merge]
      Merge mysql-trunk-innodb -> mysql-trunk

    modified:
      storage/innobase/btr/btr0sea.c
      storage/innobase/include/ha0ha.h
=== modified file 'storage/innobase/btr/btr0sea.c'
--- a/storage/innobase/btr/btr0sea.c	revid:tor.didriksen@stripped
+++ b/storage/innobase/btr/btr0sea.c	revid:vasil.dimov@stripped
@@ -1625,25 +1625,6 @@ btr_search_update_hash_node_on_insert(
 
 /********************************************************************//**
 Updates the page hash index when a single record is inserted on a page. */
-UNIV_INLINE
-void
-btr_search_insert_fold(
-/*===================*/
-	hash_table_t*   table,  /*!< in: hash table */
-	ulint           fold,   /*!< in: folded value of data; if a node with
-				the same fold value already exists, it is
-				updated to point to the same data, and no new
-				node is created! */
-	buf_block_t*    block,  /*!< in: buffer block containing the data */
-	void*           data)	/*!< in: data, must not be NULL */
-{
-	ha_insert_for_fold(table, fold, block, data);
-
-	MONITOR_INC(MONITOR_ADAPTIVE_HASH_ROW_ADDED);
-}
-
-/********************************************************************//**
-Updates the page hash index when a single record is inserted on a page. */
 UNIV_INTERN
 void
 btr_search_update_hash_on_insert(
@@ -1722,7 +1703,7 @@ btr_search_update_hash_on_insert(
 
 			locked = TRUE;
 
-			btr_search_insert_fold(table, ins_fold, block, ins_rec);
+			ha_insert_for_fold(table, ins_fold, block, ins_rec);
 		}
 
 		goto check_next_rec;
@@ -1738,9 +1719,9 @@ btr_search_update_hash_on_insert(
 		}
 
 		if (!left_side) {
-			btr_search_insert_fold(table, fold, block, rec);
+			ha_insert_for_fold(table, fold, block, rec);
 		} else {
-			btr_search_insert_fold(table, ins_fold, block, ins_rec);
+			ha_insert_for_fold(table, ins_fold, block, ins_rec);
 		}
 	}
 
@@ -1755,7 +1736,7 @@ check_next_rec:
 				locked = TRUE;
 			}
 
-			btr_search_insert_fold(table, ins_fold, block, ins_rec);
+			ha_insert_for_fold(table, ins_fold, block, ins_rec);
 		}
 
 		goto function_exit;
@@ -1772,15 +1753,14 @@ check_next_rec:
 
 		if (!left_side) {
 
-			btr_search_insert_fold(table, ins_fold, block, ins_rec);
+			ha_insert_for_fold(table, ins_fold, block, ins_rec);
 			/*
 			fputs("Hash insert for ", stderr);
 			dict_index_name_print(stderr, cursor->index);
 			fprintf(stderr, " fold %lu\n", ins_fold);
 			*/
 		} else {
-			btr_search_insert_fold(table, next_fold, block,
-					       next_rec);
+			ha_insert_for_fold(table, next_fold, block, next_rec);
 		}
 	}
 

=== modified file 'storage/innobase/include/ha0ha.h'
--- a/storage/innobase/include/ha0ha.h	revid:tor.didriksen@stripped
+++ b/storage/innobase/include/ha0ha.h	revid:vasil.dimov@stripped
@@ -155,7 +155,10 @@ is inserted.
 @param f	in: folded value of data
 @param b	in: buffer block containing the data
 @param d	in: data, must not be NULL */
-# define ha_insert_for_fold(t,f,b,d) ha_insert_for_fold_func(t,f,b,d)
+# define ha_insert_for_fold(t,f,b,d) 	do {		\
+	ha_insert_for_fold_func(t,f,b,d);		\
+	MONITOR_INC(MONITOR_ADAPTIVE_HASH_ROW_ADDED);	\
+} while(0)
 #else /* UNIV_AHI_DEBUG || UNIV_DEBUG */
 /**
 Inserts an entry into a hash table. If an entry with the same fold number
@@ -166,7 +169,10 @@ is inserted.
 @param f	in: folded value of data
 @param b	ignored: buffer block containing the data
 @param d	in: data, must not be NULL */
-# define ha_insert_for_fold(t,f,b,d) ha_insert_for_fold_func(t,f,d)
+# define ha_insert_for_fold(t,f,b,d)	do {		\
+	ha_insert_for_fold_func(t,f,d);			\
+	MONITOR_INC(MONITOR_ADAPTIVE_HASH_ROW_ADDED);	\
+} while (0)
 #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
 
 /*********************************************************//**

No bundle (reason: revision is a merge (you can force generation of a bundle with env var BZR_FORCE_BUNDLE=1)).
Thread
bzr commit into mysql-trunk branch (vasil.dimov:3686) vasil.dimov21 Feb