[Commits] c7cc47c9fb8: Fix test failure.

jan jan.lindstrom at mariadb.com
Mon Aug 7 09:44:02 EEST 2017


revision-id: c7cc47c9fb8fde8f979b11c69bb19f6c09037594 (mariadb-10.2.7-19-gc7cc47c9fb8)
parent(s): 6b5c091b25f6579eb627ce6b28da92c63c29abbf
author: Jan Lindström
committer: Jan Lindström
timestamp: 2017-08-07 09:44:02 +0300
message:

Fix test failure.

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

diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc
index 6553a46ba46..dad7f847b40 100644
--- a/extra/innochecksum.cc
+++ b/extra/innochecksum.cc
@@ -791,6 +791,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) {
@@ -818,6 +819,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();
@@ -846,7 +866,9 @@ parse_page(
 				index.free_pages++;
 				return;
 			}
+
 			index.pages++;
+
 			if (is_leaf) {
 				index.leaf_pages++;
 				if (data_bytes > index.max_data_size) {
@@ -862,23 +884,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_zip/r/innochecksum_3.result b/mysql-test/suite/innodb_zip/r/innochecksum_3.result
index 2e1f4bcc92a..e1d11acce88 100644
--- a/mysql-test/suite/innodb_zip/r/innochecksum_3.result
+++ b/mysql-test/suite/innodb_zip/r/innochecksum_3.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		|	-
 # Variables used by page type dump for ibdata1
 
@@ -200,9 +200,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		|	-
 [6]: check the valid lower bound values for option
 # allow-mismatches,page,start-page,end-page


More information about the commits mailing list