List:Commits« Previous MessageNext Message »
From:marko.makela Date:May 26 2011 1:22pm
Subject:bzr commit into mysql-5.5 branch (marko.makela:3401)
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/mysql-5.5/ based on revid:marko.makela@strippedgq33w15abfq

 3401 Marko Mäkelä	2011-05-26
      InnoDB: Do not protect PAGE_MAX_TRX_ID with btr_search_latch.
      
      This is an experimental patch for testing. The protection seems unnecessary.

    modified:
      storage/innobase/include/page0page.h
      storage/innobase/page/page0page.c
=== modified file 'storage/innobase/include/page0page.h'
--- a/storage/innobase/include/page0page.h	revid:marko.makela@stripped15abfq
+++ b/storage/innobase/include/page0page.h	revid:marko.makela@stripped
@@ -65,13 +65,10 @@ typedef	byte		page_header_t;
 #define	PAGE_N_DIRECTION 14	/* number of consecutive inserts to the same
 				direction */
 #define	PAGE_N_RECS	 16	/* number of user records on the page */
-#define PAGE_MAX_TRX_ID	 18	/* highest id of a trx which may have modified
-				a record on the page; trx_id_t; defined only
-				in secondary indexes and in the insert buffer
-				tree; NOTE: this may be modified only
-				when the thread has an x-latch to the page,
-				and ALSO an x-latch to btr_search_latch
-				if there is a hash index to the page! */
+#define PAGE_MAX_TRX_ID	 18	/* highest trx_id_t which may have modified
+				a record on the page; defined only on leaf
+				pages in secondary indexes and in
+				the insert buffer tree */
 #define PAGE_HEADER_PRIV_END 26	/* end of private data structure of the page
 				header which are set in a page create */
 /*----*/

=== modified file 'storage/innobase/page/page0page.c'
--- a/storage/innobase/page/page0page.c	revid:marko.makela@stripped822-u3m8dgq33w15abfq
+++ b/storage/innobase/page/page0page.c	revid:marko.makela@stripped9bdu92en
@@ -215,12 +215,6 @@ page_set_max_trx_id(
 {
 	page_t*		page		= buf_block_get_frame(block);
 #ifndef UNIV_HOTBACKUP
-	const ibool	is_hashed	= block->is_hashed;
-
-	if (is_hashed) {
-		rw_lock_x_lock(&btr_search_latch);
-	}
-
 	ut_ad(!mtr || mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
 #endif /* !UNIV_HOTBACKUP */
 
@@ -241,12 +235,6 @@ page_set_max_trx_id(
 	} else {
 		mach_write_to_8(page + (PAGE_HEADER + PAGE_MAX_TRX_ID), trx_id);
 	}
-
-#ifndef UNIV_HOTBACKUP
-	if (is_hashed) {
-		rw_lock_x_unlock(&btr_search_latch);
-	}
-#endif /* !UNIV_HOTBACKUP */
 }
 
 /************************************************************//**

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20110526132244-s0xmiagc9bdu92en.bundle
Thread
bzr commit into mysql-5.5 branch (marko.makela:3401) marko.makela26 May