Commit 5991bd62 authored by Eugene Kosov's avatar Eugene Kosov

MDEV-24275 InnoDB persistent stats analyze forces full scan forcing lock crash

This is a fixup patch for MDEV-23991 afc9d00c

We really should read result.n_leaf_pages, which was set previously.

Analysis and fix was provided by Jukka Santala. Thanks!

Reviewed by: Marko Mäkelä
parent 10eaa43f
...@@ -1985,7 +1985,7 @@ static index_stats_t dict_stats_analyze_index(dict_index_t* index) ...@@ -1985,7 +1985,7 @@ static index_stats_t dict_stats_analyze_index(dict_index_t* index)
since it will be faster and will give better results. */ since it will be faster and will give better results. */
if (root_level == 0 if (root_level == 0
|| N_SAMPLE_PAGES(index) * n_uniq > index->stat_n_leaf_pages) { || N_SAMPLE_PAGES(index) * n_uniq > result.n_leaf_pages) {
if (root_level == 0) { if (root_level == 0) {
DEBUG_PRINTF(" %s(): just one page," DEBUG_PRINTF(" %s(): just one page,"
......
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