MDEV-34474 InnoDB: Failing assertion: stat_n_leaf_pages > 0 in...

MDEV-34474 InnoDB: Failing assertion: stat_n_leaf_pages > 0 in ha_innobase::estimate_rows_upper_bound

- Fixing the compilation issue.
parent 3b956f83
...@@ -2670,7 +2670,8 @@ dict_stats_fetch_table_stats_step( ...@@ -2670,7 +2670,8 @@ dict_stats_fetch_table_stats_step(
ut_a(len == 8); ut_a(len == 8);
table->stat_clustered_index_size table->stat_clustered_index_size
= std::max<ulint>(mach_read_from_8(data), 1); = std::max<ulint>(
(ulint) mach_read_from_8(data), 1);
break; break;
} }
...@@ -2688,7 +2689,7 @@ dict_stats_fetch_table_stats_step( ...@@ -2688,7 +2689,7 @@ dict_stats_fetch_table_stats_step(
} }
table->stat_sum_of_other_index_sizes table->stat_sum_of_other_index_sizes
= std::max<ulint>( = std::max<ulint>(
mach_read_from_8(data), (ulint) mach_read_from_8(data),
UT_LIST_GET_LEN(table->indexes) - 1); UT_LIST_GET_LEN(table->indexes) - 1);
break; break;
...@@ -2876,13 +2877,13 @@ dict_stats_fetch_index_stats_step( ...@@ -2876,13 +2877,13 @@ dict_stats_fetch_index_stats_step(
if (stat_name_len == 4 /* strlen("size") */ if (stat_name_len == 4 /* strlen("size") */
&& strncasecmp("size", stat_name, stat_name_len) == 0) { && strncasecmp("size", stat_name, stat_name_len) == 0) {
index->stat_index_size index->stat_index_size
= std::max<ulint>(stat_value, 1); = std::max<ulint>((ulint) stat_value, 1);
arg->stats_were_modified = true; arg->stats_were_modified = true;
} else if (stat_name_len == 12 /* strlen("n_leaf_pages") */ } else if (stat_name_len == 12 /* strlen("n_leaf_pages") */
&& strncasecmp("n_leaf_pages", stat_name, stat_name_len) && strncasecmp("n_leaf_pages", stat_name, stat_name_len)
== 0) { == 0) {
index->stat_n_leaf_pages index->stat_n_leaf_pages
= std::max<ulint>(stat_value, 1); = std::max<ulint>((ulint) stat_value, 1);
arg->stats_were_modified = true; arg->stats_were_modified = true;
} else if (stat_name_len == 12 /* strlen("n_page_split") */ } else if (stat_name_len == 12 /* strlen("n_page_split") */
&& strncasecmp("n_page_split", stat_name, stat_name_len) && strncasecmp("n_page_split", stat_name, stat_name_len)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment