List:Commits« Previous MessageNext Message »
From:tim Date:January 5 2007 11:05pm
Subject:bk commit into 5.1 tree (tsmith:1.2383)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tsmith. When tsmith 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@stripped, 2007-01-05 16:05:48-07:00, tsmith@stripped +7 -0
  Merge siva.hindu.god:/home/tsmith/m/inno/jan04/51
  into  siva.hindu.god:/home/tsmith/m/bk/51-build
  MERGE: 1.2367.2.1

  storage/innobase/buf/buf0buf.c@stripped, 2007-01-05 16:05:41-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.62.1.1

  storage/innobase/dict/dict0dict.c@stripped, 2007-01-05 16:05:41-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.94.1.1

  storage/innobase/ha/ha0ha.c@stripped, 2007-01-05 16:05:41-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.20.1.1

  storage/innobase/ha/hash0hash.c@stripped, 2007-01-05 16:05:41-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.7.1.1

  storage/innobase/include/hash0hash.h@stripped, 2007-01-05 16:05:41-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.9.1.1

  storage/innobase/lock/lock0lock.c@stripped, 2007-01-05 16:05:41-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.70.1.1

  storage/innobase/log/log0recv.c@stripped, 2007-01-05 16:05:41-07:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.63.1.1

# 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:	tsmith
# Host:	siva.hindu.god
# Root:	/home/tsmith/m/bk/51-build/RESYNC

--- 1.63/storage/innobase/buf/buf0buf.c	2007-01-01 02:53:25 -07:00
+++ 1.64/storage/innobase/buf/buf0buf.c	2007-01-05 16:05:41 -07:00
@@ -1755,22 +1755,22 @@ buf_page_init_for_read(
 	if (*err == DB_TABLESPACE_DELETED
 	    || NULL != buf_page_hash_get(space, offset)) {
 
-		    /* The page belongs to a space which has been
-		    deleted or is being deleted, or the page is
-		    already in buf_pool, return */
+		/* The page belongs to a space which has been
+		deleted or is being deleted, or the page is
+		already in buf_pool, return */
 
 		mutex_exit(&block->mutex);
-		    mutex_exit(&(buf_pool->mutex));
+		mutex_exit(&(buf_pool->mutex));
 
-		    buf_block_free(block);
+		buf_block_free(block);
 
-		    if (mode == BUF_READ_IBUF_PAGES_ONLY) {
+		if (mode == BUF_READ_IBUF_PAGES_ONLY) {
 
-			    mtr_commit(&mtr);
-		    }
+			mtr_commit(&mtr);
+		}
 
-		    return(NULL);
-	    }
+		return(NULL);
+	}
 
 	ut_ad(block);
 

--- 1.95/storage/innobase/dict/dict0dict.c	2007-01-01 02:54:08 -07:00
+++ 1.96/storage/innobase/dict/dict0dict.c	2007-01-05 16:05:41 -07:00
@@ -801,16 +801,20 @@ dict_init(void)
 }
 
 /**************************************************************************
-Returns a table object. NOTE! This is a high-level function to be used
-mainly from outside the 'dict' directory. Inside this directory
-dict_table_get_low is usually the appropriate function. */
+Returns a table object and optionally increment its MySQL open handle count.
+NOTE! This is a high-level function to be used mainly from outside the
+'dict' directory. Inside this directory dict_table_get_low is usually the
+appropriate function. */
 
 dict_table_t*
 dict_table_get(
 /*===========*/
 					/* out: table, NULL if
 					does not exist */
-	const char*	table_name)	/* in: table name */
+	const char*	table_name,	/* in: table name */
+	ibool		inc_mysql_count)
+     					/* in: whether to increment the open
+					handle count on the table */
 {
 	dict_table_t*	table;
 
@@ -818,42 +822,17 @@ dict_table_get(
 
 	table = dict_table_get_low(table_name);
 
-	mutex_exit(&(dict_sys->mutex));
-
-	if (table != NULL) {
-		if (!table->stat_initialized) {
-			dict_update_statistics(table);
-		}
-	}
-
-	return(table);
-}
-
-/**************************************************************************
-Returns a table object and increments MySQL open handle count on the table. */
-
-dict_table_t*
-dict_table_get_and_increment_handle_count(
-/*======================================*/
-					/* out: table, NULL if
-					does not exist */
-	const char*	table_name)	/* in: table name */
-{
-	dict_table_t*	table;
-
-	mutex_enter(&(dict_sys->mutex));
-
-	table = dict_table_get_low(table_name);
-
-	if (table != NULL) {
-
+	if (inc_mysql_count && table) {
 		table->n_mysql_handles_opened++;
 	}
 
 	mutex_exit(&(dict_sys->mutex));
 
 	if (table != NULL) {
-		if (!table->stat_initialized && !table->ibd_file_missing) {
+		if (!table->stat_initialized) {
+			/* If table->ibd_file_missing == TRUE, this will
+			print an error message and return without doing
+			anything. */
 			dict_update_statistics(table);
 		}
 	}

--- 1.21/storage/innobase/ha/ha0ha.c	2007-01-01 02:53:25 -07:00
+++ 1.22/storage/innobase/ha/ha0ha.c	2007-01-05 16:05:41 -07:00
@@ -18,16 +18,18 @@ Creates a hash table with >= n array cel
 chosen to be a prime number slightly bigger than n. */
 
 hash_table_t*
-ha_create(
-/*======*/
+ha_create_func(
+/*===========*/
 				/* out, own: created table */
 	ibool	in_btr_search,	/* in: TRUE if the hash table is used in
 				the btr_search module */
 	ulint	n,		/* in: number of array cells */
-	ulint	n_mutexes,	/* in: number of mutexes to protect the
-				hash table: must be a power of 2, or 0 */
-	ulint	mutex_level)	/* in: level of the mutexes in the latching
+#ifdef UNIV_SYNC_DEBUG
+	ulint	mutex_level,	/* in: level of the mutexes in the latching
 				order: this is used in the debug version */
+#endif /* UNIV_SYNC_DEBUG */
+	ulint	n_mutexes)	/* in: number of mutexes to protect the
+				hash table: must be a power of 2, or 0 */
 {
 	hash_table_t*	table;
 	ulint		i;

--- 1.8/storage/innobase/ha/hash0hash.c	2007-01-01 02:53:25 -07:00
+++ 1.9/storage/innobase/ha/hash0hash.c	2007-01-05 16:05:41 -07:00
@@ -129,13 +129,15 @@ hash_table_free(
 Creates a mutex array to protect a hash table. */
 
 void
-hash_create_mutexes(
-/*================*/
+hash_create_mutexes_func(
+/*=====================*/
 	hash_table_t*	table,		/* in: hash table */
-	ulint		n_mutexes,	/* in: number of mutexes, must be a
-					power of 2 */
-	ulint		sync_level)	/* in: latching order level of the
+#ifdef UNIV_SYNC_DEBUG
+	ulint		sync_level,	/* in: latching order level of the
 					mutexes: used in the debug version */
+#endif /* UNIV_SYNC_DEBUG */
+	ulint		n_mutexes)	/* in: number of mutexes, must be a
+					power of 2 */
 {
 	ulint	i;
 

--- 1.10/storage/innobase/include/hash0hash.h	2007-01-01 02:53:25 -07:00
+++ 1.11/storage/innobase/include/hash0hash.h	2007-01-05 16:05:41 -07:00
@@ -31,12 +31,20 @@ hash0_create(
 Creates a mutex array to protect a hash table. */
 
 void
-hash_create_mutexes(
-/*================*/
+hash_create_mutexes_func(
+/*=====================*/
 	hash_table_t*	table,		/* in: hash table */
-	ulint		n_mutexes,	/* in: number of mutexes */
-	ulint		sync_level);	/* in: latching order level of the
+#ifdef UNIV_SYNC_DEBUG
+	ulint		sync_level,	/* in: latching order level of the
 					mutexes: used in the debug version */
+#endif /* UNIV_SYNC_DEBUG */
+	ulint		n_mutexes);	/* in: number of mutexes */
+#ifdef UNIV_SYNC_DEBUG
+# define hash_create_mutexes(t,n,level) hash_create_mutexes_func(t,level,n)
+#else /* UNIV_SYNC_DEBUG */
+# define hash_create_mutexes(t,n,level) hash_create_mutexes_func(t,n)
+#endif /* UNIV_SYNC_DEBUG */
+
 /*****************************************************************
 Frees a hash table. */
 

--- 1.71/storage/innobase/lock/lock0lock.c	2007-01-01 02:53:25 -07:00
+++ 1.72/storage/innobase/lock/lock0lock.c	2007-01-05 16:05:41 -07:00
@@ -4391,10 +4391,6 @@ loop:
 					trx->read_view->up_limit_id));
 		}
 
-		fprintf(file,
-			"Trx has approximately %lu row locks\n",
-			(ulong) lock_number_of_rows_locked(trx));
-
 		if (trx->que_state == TRX_QUE_LOCK_WAIT) {
 			fprintf(file,
 				"------- TRX HAS BEEN WAITING %lu SEC"

--- 1.64/storage/innobase/log/log0recv.c	2007-01-01 02:53:25 -07:00
+++ 1.65/storage/innobase/log/log0recv.c	2007-01-05 16:05:41 -07:00
@@ -33,6 +33,7 @@ Created 9/20/1997 Heikki Tuuri
 #include "btr0cur.h"
 #include "dict0boot.h"
 #include "fil0fil.h"
+#include "sync0sync.h"
 
 #ifdef UNIV_HOTBACKUP
 /* This is set to FALSE if the backup was originally taken with the
@@ -190,6 +191,7 @@ recv_sys_empty_hash(void)
 	recv_sys->addr_hash = hash0_create(buf_pool_get_curr_size() / 256);
 }
 
+#ifndef UNIV_LOG_DEBUG
 /************************************************************
 Frees the recovery system. */
 static
@@ -209,6 +211,7 @@ recv_sys_free(void)
 
 	mutex_exit(&(recv_sys->mutex));
 }
+#endif /* UNIV_LOG_DEBUG */
 
 /************************************************************
 Truncates possible corrupted or extra records from a log group. */
@@ -2854,6 +2857,15 @@ recv_recovery_from_checkpoint_finish(voi
 
 #ifndef UNIV_LOG_DEBUG
 	recv_sys_free();
+#endif
+
+#ifdef UNIV_SYNC_DEBUG
+	/* Wait for a while so that created threads have time to suspend
+	themselves before we switch the latching order checks on */
+	os_thread_sleep(1000000);
+
+	/* Switch latching order checks on in sync0sync.c */
+	sync_order_checks_on = TRUE;
 #endif
 	if (srv_force_recovery < SRV_FORCE_NO_TRX_UNDO) {
 		/* Rollback the uncommitted transactions which have no user
Thread
bk commit into 5.1 tree (tsmith:1.2383)tim6 Jan