MDEV-31641 innochecksum dies with Floating point exception
print_summary(): Skip index_ids for which index.pages is 0. Tablespaces may contain some freed pages that used to refer to indexes or tables that were dropped.
This commit is contained in:
parent
02cd3675c4
commit
12a5fb4b36
@ -1192,11 +1192,15 @@ print_summary(
|
||||
fprintf(fil_out, "index_id\t#pages\t\t#leaf_pages\t#recs_per_page"
|
||||
"\t#bytes_per_page\n");
|
||||
|
||||
for (std::map<unsigned long long, per_index_stats>::const_iterator it = index_ids.begin();
|
||||
it != index_ids.end(); it++) {
|
||||
const per_index_stats& index = it->second;
|
||||
for (const auto &ids : index_ids) {
|
||||
const per_index_stats& index = ids.second;
|
||||
if (!index.pages) {
|
||||
DBUG_ASSERT(index.free_pages);
|
||||
continue;
|
||||
}
|
||||
|
||||
fprintf(fil_out, "%lld\t\t%lld\t\t%lld\t\t%lld\t\t%lld\n",
|
||||
it->first, index.pages, index.leaf_pages,
|
||||
ids.first, index.pages, index.leaf_pages,
|
||||
index.total_n_recs / index.pages,
|
||||
index.total_data_bytes / index.pages);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user