List:Commits« Previous MessageNext Message »
From:Alex Ivanov Notebook Date:May 15 2006 1:25pm
Subject:bk commit into 4.1 tree (aivanov:1.2472) BUG#19542
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of alexi. When alexi 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
  1.2472 06/05/15 17:25:37 aivanov@stripped +2 -0
  Applied innodb-4.1-ss29 snapshot.
   Fix BUG#19542 "InnoDB doesn't increase the Handler_read_prev counter.
   

  sql/ha_innodb.cc
    1.215 06/05/15 17:25:33 aivanov@stripped +2 -0
    Applied innodb-4.1-ss29 snapshot.
     Increment statistic counter in ha_innobase::index_prev().

  innobase/os/os0file.c
    1.105 06/05/15 17:25:33 aivanov@stripped +38 -25
    Applied innodb-4.1-ss29 snapshot.
     Check the page trailers also after writing to disk.
     This improves the chances of diagnosing Bug 18886.
     os_file_check_page_trailers(): New function for checking
     that two copies of the LSN stamped on the pages match.
     os_aio_simulated_handle(): Call os_file_check_page_trailers()
     before and after os_file_write().

# 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:	aivanov
# Host:	mysqld.localdomain
# Root:	/home/alexi/innodb/mysql-4.1-ss29-work

--- 1.104/innobase/os/os0file.c	2006-01-15 14:50:04 +03:00
+++ 1.105/innobase/os/os0file.c	2006-05-15 17:25:33 +04:00
@@ -3614,6 +3614,37 @@
 #endif
 
 /**************************************************************************
+Do a 'last millisecond' check that the page end is sensible;
+reported page checksum errors from Linux seem to wipe over the page end. */
+static
+void
+os_file_check_page_trailers(
+/*========================*/
+	byte*	combined_buf,	/* in: combined write buffer */
+	ulint	total_len)	/* in: size of combined_buf, in bytes
+				(a multiple of UNIV_PAGE_SIZE) */
+{
+	ulint	len;
+
+	for (len = 0; len + UNIV_PAGE_SIZE <= total_len;
+			len += UNIV_PAGE_SIZE) {
+		byte*	buf = combined_buf + len;
+
+		if (memcmp(buf + (FIL_PAGE_LSN + 4), buf + (UNIV_PAGE_SIZE
+				- FIL_PAGE_END_LSN_OLD_CHKSUM + 4), 4)) {
+		    	ut_print_timestamp(stderr);
+		    	fprintf(stderr,
+"  InnoDB: ERROR: The page to be written seems corrupt!\n"
+"InnoDB: Writing a block of %lu bytes, currently at offset %lu\n",
+			(ulong)total_len, (ulong)len);
+			buf_page_print(buf);
+		    	fprintf(stderr,
+"InnoDB: ERROR: The page to be written seems corrupt!\n");
+		}
+	}
+}
+
+/**************************************************************************
 Does simulated aio. This function should be called by an i/o-handler
 thread. */
 
@@ -3650,7 +3681,6 @@
 	ibool		ret;
 	ulint		n;
 	ulint		i;
-	ulint		len2;
 	
 	segment = os_aio_get_array_and_local_segment(&array, global_segment);
 	
@@ -3857,33 +3887,16 @@
 					(ulong) total_len);
 				ut_error;
 			}
-			  
-			/* Do a 'last millisecond' check that the page end
-			is sensible; reported page checksum errors from
-			Linux seem to wipe over the page end */
-
-			for (len2 = 0; len2 + UNIV_PAGE_SIZE <= total_len;
-						len2 += UNIV_PAGE_SIZE) {
-				if (mach_read_from_4(combined_buf + len2
-						+ FIL_PAGE_LSN + 4)
-				    != mach_read_from_4(combined_buf + len2
-				    		+ UNIV_PAGE_SIZE
-				    	- FIL_PAGE_END_LSN_OLD_CHKSUM + 4)) {
-				    	ut_print_timestamp(stderr);
-				    	fprintf(stderr,
-"  InnoDB: ERROR: The page to be written seems corrupt!\n");
-				    	fprintf(stderr,
-"InnoDB: Writing a block of %lu bytes, currently writing at offset %lu\n",
-					(ulong)total_len, (ulong)len2);
-					buf_page_print(combined_buf + len2);
-				    	fprintf(stderr,
-"InnoDB: ERROR: The page to be written seems corrupt!\n");
-				}
-			}
+
+			os_file_check_page_trailers(combined_buf, total_len);
 		}
-	
+
 		ret = os_file_write(slot->name, slot->file, combined_buf,
 				slot->offset, slot->offset_high, total_len);
+
+		if (array == os_aio_write_array) {
+			os_file_check_page_trailers(combined_buf, total_len);
+		}
 	} else {
 		ret = os_file_read(slot->file, combined_buf,
 				slot->offset, slot->offset_high, total_len);

--- 1.214/sql/ha_innodb.cc	2006-03-17 12:25:27 +03:00
+++ 1.215/sql/ha_innodb.cc	2006-05-15 17:25:33 +04:00
@@ -3431,6 +3431,8 @@
 	mysql_byte* 	buf)	/* in/out: buffer for previous row in MySQL
 				format */
 {
+  	statistic_increment(ha_read_prev_count, &LOCK_status);
+
 	return(general_fetch(buf, ROW_SEL_PREV, 0));
 }
 
Thread
bk commit into 4.1 tree (aivanov:1.2472) BUG#19542Alex Ivanov Notebook15 May