Skip to content

Commit 46d95ae

Browse files
MDEV-34474 InnoDB: Failing assertion: stat_n_leaf_pages > 0 in ha_innobase::estimate_rows_upper_bound
- Fixing the compilation issue.
1 parent 3b956f8 commit 46d95ae

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

storage/innobase/dict/dict0stats.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2670,7 +2670,8 @@ dict_stats_fetch_table_stats_step(
26702670
ut_a(len == 8);
26712671

26722672
table->stat_clustered_index_size
2673-
= std::max<ulint>(mach_read_from_8(data), 1);
2673+
= std::max<ulint>(
2674+
(ulint) mach_read_from_8(data), 1);
26742675
break;
26752676
}
26762677

@@ -2688,7 +2689,7 @@ dict_stats_fetch_table_stats_step(
26882689
}
26892690
table->stat_sum_of_other_index_sizes
26902691
= std::max<ulint>(
2691-
mach_read_from_8(data),
2692+
(ulint) mach_read_from_8(data),
26922693
UT_LIST_GET_LEN(table->indexes) - 1);
26932694

26942695
break;
@@ -2876,13 +2877,13 @@ dict_stats_fetch_index_stats_step(
28762877
if (stat_name_len == 4 /* strlen("size") */
28772878
&& strncasecmp("size", stat_name, stat_name_len) == 0) {
28782879
index->stat_index_size
2879-
= std::max<ulint>(stat_value, 1);
2880+
= std::max<ulint>((ulint) stat_value, 1);
28802881
arg->stats_were_modified = true;
28812882
} else if (stat_name_len == 12 /* strlen("n_leaf_pages") */
28822883
&& strncasecmp("n_leaf_pages", stat_name, stat_name_len)
28832884
== 0) {
28842885
index->stat_n_leaf_pages
2885-
= std::max<ulint>(stat_value, 1);
2886+
= std::max<ulint>((ulint) stat_value, 1);
28862887
arg->stats_were_modified = true;
28872888
} else if (stat_name_len == 12 /* strlen("n_page_split") */
28882889
&& strncasecmp("n_page_split", stat_name, stat_name_len)

0 commit comments

Comments
 (0)