MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:April 1 2010 11:59am
Subject:bzr commit into mysql-5.1-bugteam branch (svoj:3511)
View as plain text  
#At file:///home/svoj/devel/innodb-snapshots/mysql-5.1-bugteam/ based on revid:svoj@stripped

 3511 Sergey Vojtovich	2010-04-01
      Applying InnoDB snapshot 
      
      Detailed revision comments:
      
      r6740 | sunny | 2010-02-18 13:44:31 +0200 (Thu, 18 Feb 2010) | 6 lines
      branches/zip: Don't print the entire lock bit set if the block was not
      found in the buffer pool. Only print the bits that are set and that
      information is in the lock and not in the block.
      
      See rb://256 approved by Marko.

    modified:
      storage/innodb_plugin/lock/lock0lock.c
=== modified file 'storage/innodb_plugin/lock/lock0lock.c'
--- a/storage/innodb_plugin/lock/lock0lock.c	2010-04-01 11:56:38 +0000
+++ b/storage/innodb_plugin/lock/lock0lock.c	2010-04-01 11:58:48 +0000
@@ -4309,28 +4309,29 @@ lock_rec_print(
 
 	block = buf_page_try_get(space, page_no, &mtr);
 
-	if (block) {
-		for (i = 0; i < lock_rec_get_n_bits(lock); i++) {
+	for (i = 0; i < lock_rec_get_n_bits(lock); ++i) {
 
-			if (lock_rec_get_nth_bit(lock, i)) {
-
-				const rec_t*	rec
-					= page_find_rec_with_heap_no(
-						buf_block_get_frame(block), i);
-				offsets = rec_get_offsets(
-					rec, lock->index, offsets,
-					ULINT_UNDEFINED, &heap);
-
-				fprintf(file, "Record lock, heap no %lu ",
-					(ulong) i);
-				rec_print_new(file, rec, offsets);
-				putc('\n', file);
-			}
+		if (!lock_rec_get_nth_bit(lock, i)) {
+			continue;
 		}
-	} else {
-		for (i = 0; i < lock_rec_get_n_bits(lock); i++) {
-			fprintf(file, "Record lock, heap no %lu\n", (ulong) i);
+
+		fprintf(file, "Record lock, heap no %lu", (ulong) i);
+
+		if (block) {
+			const rec_t*	rec;
+
+			rec = page_find_rec_with_heap_no(
+				buf_block_get_frame(block), i);
+
+			offsets = rec_get_offsets(
+				rec, lock->index, offsets,
+				ULINT_UNDEFINED, &heap);
+
+			putc(' ', file);
+			rec_print_new(file, rec, offsets);
 		}
+
+		putc('\n', file);
 	}
 
 	mtr_commit(&mtr);


Attachment: [text/bzr-bundle] bzr/svoj@sun.com-20100401115848-blftc2x3z63qov4k.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (svoj:3511)Sergey Vojtovich1 Apr