List:Commits« Previous MessageNext Message »
From:Anil Toshniwal Date:April 18 2013 5:31am
Subject:bzr push into mysql-trunk branch (anil.toshniwal:5467 to 5468) WL#6045
View as plain text  
 5468 Anil Toshniwal	2013-04-17
      WL#6045 Improve Innochecksum
      --Fix pb2 failure and testing in itch

    modified:
      CMakeLists.txt
      extra/innochecksum.cc
      mysql-test/suite/innodb/r/innodb-wl6045-linux.result
      mysql-test/suite/innodb/t/innodb-wl6045-linux.test
      sql/CMakeLists.txt
 5467 Anil Toshniwal	2013-04-15
      WL#6045 Improve Innochecksum
      --Change the innochecksum to be debug variant during build.
      --Fixed the test failure in Solaris platform.

    modified:
      extra/CMakeLists.txt
      extra/innochecksum.cc
      mysql-test/mysql-test-run.pl
      packaging/WiX/create_msi.cmake.in
      packaging/rpm-uln/mysql.spec.sh
      storage/innobase/buf/buf0buf.cc
      storage/innobase/include/buf0buf.h
      storage/innobase/include/page0zip.h
      storage/innobase/page/page0zip.cc
      support-files/mysql.spec.sh
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt	revid:anil.toshniwal@stripped
+++ b/CMakeLists.txt	revid:anil.toshniwal@stripped
@@ -265,9 +265,6 @@ OPTION(OPTIMIZER_TRACE "Support tracing
 OPTION(INNODB_COMPILER_HINTS "Compile InnoDB with compiler hints" ON)
 MARK_AS_ADVANCED(INNODB_COMPILER_HINTS)
 
-OPTION(DEBUG_EXTNAME "Build server as mysqld-debug (debug builds only)" OFF)
-MARK_AS_ADVANCED(DEBUG_EXTNAME)
-
 # Set DBUG_OFF and other optional release-only flags for non-debug project types
 FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)
   FOREACH(LANG C CXX)

=== modified file 'extra/innochecksum.cc'
--- a/extra/innochecksum.cc	revid:anil.toshniwal@stripped
+++ b/extra/innochecksum.cc	revid:anil.toshniwal@stripped
@@ -279,40 +279,29 @@ open_file(
  Read the content of file
 
  @param  [in,out]	buf			read the file in buffer
- @param  [in]		min_page		minimum page size read buffer
+ @param  [in]		partial_page_read	enable when to read the
+						remaining buffer for first page.
  @param  [in]		physical_page_size	Physical/Commpressed page size.
  @param  [in,out]	fil_in			file pointer created for the
 						tablespace.
  @retval no. of bytes read.
 */
 ulong read_file(
-	byte*	buf,
-	byte*	min_page,
+	byte**	buf,
 	bool	partial_page_read,
 	ulong	physical_page_size,
 	FILE**	fil_in)
 {
 	ulong bytes = 0;
-	/* page to read the remaining buffer for first page. */
-	byte* page;
-
 	if (partial_page_read) {
-		page = (unsigned char*) malloc(
-				sizeof(unsigned char)
-				* (physical_page_size - UNIV_PAGE_SIZE_MIN));
-
-		bytes = fread(page, 1,
+		bytes = fread(*buf + UNIV_PAGE_SIZE_MIN, 1,
 				physical_page_size - UNIV_PAGE_SIZE_MIN,
 				*fil_in);
 
-		memcpy(buf, min_page, UNIV_PAGE_SIZE_MIN);
-		memcpy(buf + UNIV_PAGE_SIZE_MIN, page,
-			physical_page_size - UNIV_PAGE_SIZE_MIN);
-
 		bytes += UNIV_PAGE_SIZE_MIN;
 
 	} else {
-		bytes = fread(buf, 1, physical_page_size, *fil_in);
+		bytes = fread(*buf, 1, physical_page_size, *fil_in);
 	}
 	return bytes;
 }
@@ -958,9 +947,9 @@ int main(
 	/* our input filename. */
 	char*		filename;
 	/* Buffer to store pages read. */
-	uchar		buf[UNIV_PAGE_SIZE_MAX];
-	/* Buffer the minimum page size for first page. */
-	uchar		min_page[UNIV_PAGE_SIZE_MIN];
+	byte* buf = (uchar*) malloc(
+			sizeof(uchar) * (UNIV_PAGE_SIZE_MAX));
+
 	/* bytes read count */
 	ulong		bytes;
 	/* current time */
@@ -1113,7 +1102,7 @@ int main(
 #endif
 
 		/* Read the minimum page size. */
-		bytes = fread(min_page, 1, UNIV_PAGE_SIZE_MIN, fil_in);
+		bytes = fread(buf, 1, UNIV_PAGE_SIZE_MIN, fil_in);
 		partial_page_read = 1;
 
 		if (bytes != UNIV_PAGE_SIZE_MIN) {
@@ -1128,11 +1117,11 @@ int main(
 		/* enable variable is_system_tablespace when space_id of given
 		file is zero. Use to skip the checksum verification and rewrite
 		for doublewrite pages. */
-		is_system_tablespace = (!memcmp(&space_id, min_page +
+		is_system_tablespace = (!memcmp(&space_id, buf +
 					FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID, 4))
 					? true : false;
 
-		get_page_size(min_page, &logical_page_size,
+		get_page_size(buf, &logical_page_size,
 			      &physical_page_size, &compressed);
 
 		pages = (ulint)(size / physical_page_size);
@@ -1196,7 +1185,7 @@ int main(
 					(fseeko() on stdin doesn't work). So
 					read only the remaining part of page,
 					if partial_page_read is enable. */
-					bytes = read_file(buf, min_page,
+					bytes = read_file(&buf,
 							  partial_page_read,
 							  physical_page_size,
 							  &fil_in);
@@ -1234,7 +1223,7 @@ int main(
 		lastt = 0;
 		while (!feof(fil_in)) {
 
-			bytes = read_file(buf, min_page, partial_page_read,
+			bytes = read_file(&buf, partial_page_read,
 					  physical_page_size,&fil_in);
 			partial_page_read = 0;
 
@@ -1317,6 +1306,7 @@ int main(
 					}
 					/* Save the current file pointer in pos
 					variable */
+					fflush(fil_in);
 					fgetpos(fil_in, &pos);
 				}
 			}

=== modified file 'mysql-test/suite/innodb/r/innodb-wl6045-linux.result'
--- a/mysql-test/suite/innodb/r/innodb-wl6045-linux.result	revid:anil.toshniwal@stripped
+++ b/mysql-test/suite/innodb/r/innodb-wl6045-linux.result	revid:anil.toshniwal@stripped
@@ -31,7 +31,7 @@ main: info: Page::# is empty and uncorru
 # Test [2] for read from standard input for innochecksum tool with rewrite of crc32 checksum.
 # Backup the t1.ibd before any rewrite of checksum, so used for further testing.
 # Print the information for debug option.
-find_type: enter: x: 'crc32'  lib: #x#a#
+
 main: info: Filename = -
 main: info: page::#; log sequence number:first = #; second = #
 main: info: page::#; old style: calculated = #; recorded = #
@@ -58,7 +58,7 @@ main: info: Page::# is empty and uncorru
 main: info: page::#; log sequence number:first = #; second = #
 main: info: Page::# is empty and uncorrupted
 # Recheck the a.ibd created file having crc32 checksum with the --strict-check=crc32 for innochecksum tool.
-find_type: enter: x: 'crc32'  lib: #x#a#
+
 main: info: Filename = a.ibd
 main: info: page::#; log sequence number:first = #; second = #
 main: info: page::#; crc32 calculated = #;recorded checksum field# = # recorded checksum field# =#
@@ -105,7 +105,7 @@ page-type-dump                    (No de
        #	Index page
        #	Undo log page
        #	Inode page
-       #	Insert buffer free list page
+       #	INSERT buffer free list page
        #	Freshly allocated page
        #	Insert buffer bitmap
        #	System page
@@ -120,7 +120,7 @@ Additional information:
 Undo page type: # insert, # update, # other
 Undo page state: # active, # cached, # to_free, # to_purge, # prepared, # other
 # Print the information for debug option.
-find_type: enter: x: 'none'  lib: #x#a#
+
 main: info: Filename = -
 main: info: page::#; log sequence number:first = #; second = #
 main: info: page::#; old style: calculated = #; recorded = #
@@ -147,7 +147,7 @@ main: info: Page::# is empty and uncorru
 main: info: page::#; log sequence number:first = #; second = #
 main: info: Page::# is empty and uncorrupted
 # Recheck the a.ibd created file having crc32 checksum with the --strict-check=none for innochecksum tool.
-find_type: enter: x: 'none'  lib: #x#a#
+
 main: info: Filename = a.ibd
 main: info: page::#; log sequence number:first = #; second = #
 main: info: page::#; none checksum: calculated = #; recorded checksum_field# = # recorded checksum_field# = #
@@ -168,7 +168,7 @@ main: info: Page::# is empty and uncorru
 # Test[4] for read from standard input for innochecksum tool with rewrite of "innodb" checksum.
 # Command for innochecksum too to read from stdin and rewrite the checksum to "innodb"
 # Print the information for debug option.
-find_type: enter: x: 'innodb'  lib: #x#a#
+
 main: info: Filename = -
 main: info: page::#; log sequence number:first = #; second = #
 main: info: page::#; old style: calculated = #; recorded = #
@@ -195,7 +195,7 @@ main: info: Page::# is empty and uncorru
 main: info: page::#; log sequence number:first = #; second = #
 main: info: Page::# is empty and uncorrupted
 # Recheck the a.ibd created file having crc32 checksum with the --strict-check=innodb for innochecksum tool.
-find_type: enter: x: 'innodb'  lib: #x#a#
+
 main: info: Filename = a.ibd
 main: info: page::#; log sequence number:first = #; second = #
 main: info: page::#; old style:calculated = #; recorded checksum = #

=== modified file 'mysql-test/suite/innodb/t/innodb-wl6045-linux.test'
--- a/mysql-test/suite/innodb/t/innodb-wl6045-linux.test	revid:anil.toshniwal@stripped
+++ b/mysql-test/suite/innodb/t/innodb-wl6045-linux.test	revid:anil.toshniwal@stripped
@@ -72,6 +72,7 @@ while(<IN_FILE>) {
  $_=~ s/crc#/crc32/g;
  $_=~ s/Filename =.+/Filename = -/g;
  $_=~ s/file .+ =/file - =/g;
+ $_=~ s/find_type:.+$//g;
  print OUT_FILE $_;
 }
 close(IN_FILE);
@@ -114,6 +115,7 @@ while(<IN_FILE>) {
  $_=~ s/crc#/crc32/g;
  $_=~ s/Filename =.+/Filename = -/g;
  $_=~ s/file .+ =/file - =/g;
+ $_=~ s/find_type:.+$//g;
  print OUT_FILE $_;
 }
 close(IN_FILE);
@@ -143,6 +145,7 @@ while(<IN_FILE>) {
  $_=~ s/crc#/crc32/g;
  $_=~ s/Filename =.+/Filename = a.ibd/g;
  $_=~ s/file .+ =/file t1.ibd =/g;
+ $_=~ s/find_type:.+$//g;
  print OUT_FILE $_;
 }
 close(IN_FILE);
@@ -205,6 +208,7 @@ while(<IN_FILE>) {
  $_=~ s/crc#/crc32/g;
  $_=~ s/Filename =.+/Filename = -/g;
  $_=~ s/file .+ =/file - =/g;
+ $_=~ s/find_type:.+$//g;
  print OUT_FILE $_;
 }
 close(IN_FILE);
@@ -254,6 +258,7 @@ while(<IN_FILE>) {
  $_=~ s/crc#/crc32/g;
  $_=~ s/Filename =.+/Filename = a.ibd/g;
  $_=~ s/file .+ =/file t1.ibd =/g;
+ $_=~ s/find_type:.+$//g;
  print OUT_FILE $_;
 }
 close(IN_FILE);
@@ -314,6 +319,7 @@ while(<IN_FILE>) {
  $_=~ s/crc#/crc32/g;
  $_=~ s/Filename =.+/Filename = -/g;
  $_=~ s/file .+ =/file - =/g;
+ $_=~ s/find_type:.+$//g;
  print OUT_FILE $_;
 }
 close(IN_FILE);
@@ -343,6 +349,7 @@ while(<IN_FILE>) {
  $_=~ s/crc#/crc32/g;
  $_=~ s/Filename =.+/Filename = a.ibd/g;
  $_=~ s/file .+ =/file t1.ibd =/g;
+ $_=~ s/find_type:.+$//g;
  print OUT_FILE $_;
 }
 close(IN_FILE);

=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt	revid:anil.toshniwal@stripped
+++ b/sql/CMakeLists.txt	revid:anil.toshniwal@stripped
@@ -273,6 +273,10 @@ ELSE()
 ENDIF()
 
 MYSQL_ADD_EXECUTABLE(mysqld ${MYSQLD_SOURCE} DESTINATION ${INSTALL_SBINDIR} COMPONENT Server)
+
+OPTION(DEBUG_EXTNAME "Build server as mysqld-debug (debug builds only)" OFF)
+MARK_AS_ADVANCED(DEBUG_EXTNAME)
+
 IF(DEBUG_EXTNAME)
   SET_TARGET_PROPERTIES(mysqld PROPERTIES DEBUG_OUTPUT_NAME "mysqld-debug")
 ENDIF()

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (anil.toshniwal:5467 to 5468) WL#6045Anil Toshniwal20 May