List:Commits« Previous MessageNext Message »
From:vasil.dimov Date:February 21 2011 10:26am
Subject:bzr push into mysql-trunk branch (vasil.dimov:3685 to 3686)
View as plain text  
 3686 Vasil Dimov	2011-02-21 [merge]
      Merge mysql-trunk-innodb -> mysql-trunk

    modified:
      storage/innobase/btr/btr0sea.c
      storage/innobase/include/ha0ha.h
 3685 Tor Didriksen	2011-02-18
      Bug #11788245 - 60110 DO MORE THD AND GLOBAL INITIALIZATION FOR UNIT TESTING
     @ sql/mysqld.cc
        Let unit test setup call init_common_variables() rather than init_thread_environment()
        
        Add utility set_remaining_args() to set global variables remaining_xxx.
        
        check_enough_stack_size should have C linkage (warning by sun compiler)
     @ sql/mysqld.h
        Let unit test setup call init_common_variables() rather than init_thread_environment()
        
        Add utility set_remaining_args() to set global variables remaining_xxx.
     @ sql/sql_class.cc
        Change interface of plugin_thdvar_init()
     @ sql/sql_plugin.cc
        Change interface of plugin_thdvar_init()
     @ sql/sql_plugin.h
        Change interface of plugin_thdvar_init()
     @ unittest/gunit/item-t.cc
        More initializations in SetUpTestCase()
        New tests: ItemFuncSetUserVar, OutOfMemory

    modified:
      sql/mysqld.cc
      sql/mysqld.h
      sql/sql_class.cc
      sql/sql_plugin.cc
      sql/sql_plugin.h
      unittest/gunit/item-t.cc
=== 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: useless for push emails).
Thread
bzr push into mysql-trunk branch (vasil.dimov:3685 to 3686) vasil.dimov21 Feb