List:Commits« Previous MessageNext Message »
From:marko.makela Date:May 25 2010 12:54pm
Subject:bzr push into mysql-5.1-innodb branch (marko.makela:3480 to 3482) Bug#53627
View as plain text  
 3482 Marko Mäkelä	2010-05-25
      row_search_for_mysql(): Add assertions to track down Bug #53627.

    modified:
      storage/innodb_plugin/row/row0sel.c
 3481 Marko Mäkelä	2010-05-25
      Suppress bogus Valgrind warnings about buf_buddy_relocate()
      accessing uninitialized memory in Valgrind-instrumented builds.

    modified:
      mysql-test/valgrind.supp
      storage/innodb_plugin/buf/buf0buddy.c
 3480 Marko Mäkelä	2010-05-24
      Document the Bug #53578 fix.

    modified:
      storage/innodb_plugin/ChangeLog
=== modified file 'mysql-test/valgrind.supp'
--- a/mysql-test/valgrind.supp	revid:marko.makela@stripped
+++ b/mysql-test/valgrind.supp	revid:marko.makela@stripped0525125352-hgafpmqhrrj7pv5i
@@ -722,3 +722,8 @@
    fun:pthread_create*
 }
 
+{
+   buf_buddy_relocate peeking (space,page) in potentially free blocks
+   Memcheck:Addr1
+   fun:buf_buddy_relocate
+}

=== modified file 'storage/innodb_plugin/buf/buf0buddy.c'
--- a/storage/innodb_plugin/buf/buf0buddy.c	revid:marko.makela@stripped14349-5kaw52sz0yh4szkb
+++ b/storage/innodb_plugin/buf/buf0buddy.c	revid:marko.makela@strippedafpmqhrrj7pv5i
@@ -442,11 +442,15 @@ buf_buddy_relocate(
 		pool), so there is nothing wrong about this.  The
 		mach_read_from_4() calls here will only trigger bogus
 		Valgrind memcheck warnings in UNIV_DEBUG_VALGRIND builds. */
-		bpage = buf_page_hash_get(
-			mach_read_from_4((const byte*) src
-					 + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID),
-			mach_read_from_4((const byte*) src
-					 + FIL_PAGE_OFFSET));
+		ulint		space	= mach_read_from_4(
+			(const byte*) src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
+		ulint		page_no	= mach_read_from_4(
+			(const byte*) src + FIL_PAGE_OFFSET);
+		/* Suppress Valgrind warnings about conditional jump
+		on uninitialized value. */
+		UNIV_MEM_VALID(&space, sizeof space);
+		UNIV_MEM_VALID(&page_no, sizeof page_no);
+		bpage = buf_page_hash_get(space, page_no);
 
 		if (!bpage || bpage->zip.data != src) {
 			/* The block has probably been freshly

=== modified file 'storage/innodb_plugin/row/row0sel.c'
--- a/storage/innodb_plugin/row/row0sel.c	revid:marko.makela@stripped524114349-5kaw52sz0yh4szkb
+++ b/storage/innodb_plugin/row/row0sel.c	revid:marko.makela@strippedhgafpmqhrrj7pv5i
@@ -3611,6 +3611,13 @@ shortcut_fails_too_big_rec:
 		trx->has_search_latch = FALSE;
 	}
 
+	ut_ad(prebuilt->sql_stat_start || trx->conc_state == TRX_ACTIVE);
+	ut_ad(trx->conc_state == TRX_NOT_STARTED
+	      || trx->conc_state == TRX_ACTIVE);
+	ut_ad(prebuilt->sql_stat_start
+	      || prebuilt->select_lock_type != LOCK_NONE
+	      || trx->read_view);
+
 	trx_start_if_not_started(trx);
 
 	if (trx->isolation_level <= TRX_ISO_READ_COMMITTED

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100525125352-hgafpmqhrrj7pv5i.bundle
Thread
bzr push into mysql-5.1-innodb branch (marko.makela:3480 to 3482) Bug#53627marko.makela25 May