[Commits] d4e3becea66: Fix test failure.

jan jan.lindstrom at mariadb.com
Sat Aug 5 19:19:04 EEST 2017


revision-id: d4e3becea6618c9a4c2d4485324289ff58740089 (mariadb-10.1.25-17-gd4e3becea66)
parent(s): 6e55c21a6036a9590d6e810606705655b9aaa0ea
author: Jan Lindström
committer: Jan Lindström
timestamp: 2017-08-05 19:18:59 +0300
message:

Fix test failure.

---
 extra/innochecksum.cc                              | 35 ++++++++++++++--------
 .../suite/innodb/r/innodb_zip_innochecksum3.result | 12 ++++----
 2 files changed, 29 insertions(+), 18 deletions(-)

diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc
index 9f4c1f476e8..a64595b4483 100644
--- a/extra/innochecksum.cc
+++ b/extra/innochecksum.cc
@@ -788,6 +788,7 @@ parse_page(
 	ulint data_bytes;
 	int is_leaf;
 	int size_range_id;
+	ulint data_types=0;
 
 	/* Check whether page is doublewrite buffer. */
 	if(skip_page) {
@@ -815,6 +816,25 @@ parse_page(
 		}
 
 		is_leaf = page_is_leaf(page);
+
+		if (page_type_dump) {
+			fprintf(file, "#::%8" PRIuMAX "\t\t|\t\tIndex page\t\t\t|"
+				"\tindex id=%llu,", cur_page_num, id);
+
+			fprintf(file,
+				" page level=" ULINTPF " leaf %u"
+				", No. of records=" ULINTPF
+				", garbage=" ULINTPF
+				", n_recs=" ULINTPF
+				", %s\n",
+				page_header_get_field(page, PAGE_LEVEL),
+				is_leaf,
+				n_recs,
+				page_header_get_field(page, PAGE_GARBAGE),
+				data_types,
+				str);
+		}
+
 		size_range_id = (data_bytes * SIZE_RANGES_FOR_PAGE
 			+ page_size.logical() - 1) /
 			page_size.logical();
@@ -845,7 +865,9 @@ parse_page(
 				index.free_pages++;
 				return;
 			}
+
 			index.pages++;
+
 			if (is_leaf) {
 				index.leaf_pages++;
 				if (data_bytes > index.max_data_size) {
@@ -861,23 +883,12 @@ parse_page(
 					index.count++;
 				}
 			}
+
 			index.total_n_recs += n_recs;
 			index.total_data_bytes += data_bytes;
 			index.pages_in_size_range[size_range_id] ++;
 		}
 
-		if (page_type_dump) {
-			fprintf(file, "#::%8" PRIuMAX "\t\t|\t\tIndex page\t\t\t|"
-				"\tindex id=%llu,", cur_page_num, id);
-
-			fprintf(file,
-				" page level=" ULINTPF
-				", No. of records=" ULINTPF
-				", garbage=" ULINTPF ", %s\n",
-				page_header_get_field(page, PAGE_LEVEL),
-				page_header_get_field(page, PAGE_N_RECS),
-				page_header_get_field(page, PAGE_GARBAGE), str);
-		}
 		break;
 	}
 	case FIL_PAGE_UNDO_LOG:
diff --git a/mysql-test/suite/innodb/r/innodb_zip_innochecksum3.result b/mysql-test/suite/innodb/r/innodb_zip_innochecksum3.result
index 9ff3d89cda1..3c65f40900c 100644
--- a/mysql-test/suite/innodb/r/innodb_zip_innochecksum3.result
+++ b/mysql-test/suite/innodb/r/innodb_zip_innochecksum3.result
@@ -166,9 +166,9 @@ Filename::tab#.ibd
 #::       #		|		File Space Header		|	-
 #::       #		|		Insert Buffer Bitmap		|	-
 #::       #		|		Inode page			|	-
-#::       #		|		Index page			|	index id=#, page level=#, No. of records=#, garbage=#, -
-#::       #		|		Index page			|	index id=#, page level=#, No. of records=#, garbage=#, -
-#::       #		|		Index page			|	index id=#, page level=#, No. of records=#, garbage=#, -
+#::       #		|		Index page			|	index id=#, page level=# leaf #, No. of records=#, garbage=#, n_recs=#, -
+#::       #		|		Index page			|	index id=#, page level=# leaf #, No. of records=#, garbage=#, n_recs=#, -
+#::       #		|		Index page			|	index id=#, page level=# leaf #, No. of records=#, garbage=#, n_recs=#, -
 #::       #		|		Freshly allocated page		|	-
 #::       #		|		Freshly allocated page		|	-
 # Variables used by page type dump for ibdata1
@@ -201,9 +201,9 @@ Filename::tab#.ibd
 #::       #		|		File Space Header		|	-
 #::       #		|		Insert Buffer Bitmap		|	-
 #::       #		|		Inode page			|	-
-#::       #		|		Index page			|	index id=#, page level=#, No. of records=#, garbage=#, -
-#::       #		|		Index page			|	index id=#, page level=#, No. of records=#, garbage=#, -
-#::       #		|		Index page			|	index id=#, page level=#, No. of records=#, garbage=#, -
+#::       #		|		Index page			|	index id=#, page level=# leaf #, No. of records=#, garbage=#, n_recs=#, -
+#::       #		|		Index page			|	index id=#, page level=# leaf #, No. of records=#, garbage=#, n_recs=#, -
+#::       #		|		Index page			|	index id=#, page level=# leaf #, No. of records=#, garbage=#, n_recs=#, -
 #::       #		|		Freshly allocated page		|	-
 #::       #		|		Freshly allocated page		|	-
 [6]: check the valid lower bound values for option


More information about the commits mailing list