Created
January 11, 2023 21:50
-
-
Save mdcallag/dbeeb17949952623ead44cb1fe12b68b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ diff -u mysql-8.0.31/storage/innobase/btr/btr0cur.cc mysql-8.0.31.dbg/storage/innobase/btr | |
--- mysql-8.0.31/storage/innobase/btr/btr0cur.cc 2022-09-13 09:15:16.000000000 -0700 | |
+++ mysql-8.0.31.dbg/storage/innobase/btr/btr0cur.cc 2023-01-10 10:46:44.722502358 -0800 | |
@@ -4828,6 +4828,7 @@ | |
n_rows_on_prev_level). In this case we set is_n_rows_exact to false. | |
@return number of rows, not including the borders (exact or estimated) */ | |
static int64_t btr_estimate_n_rows_in_range_on_level( | |
+ ulint divergence_level, ulint loop, | |
dict_index_t *index, /*!< in: index */ | |
btr_path_t *slot1, /*!< in: left border */ | |
btr_path_t *slot2, /*!< in: right border */ | |
@@ -4943,6 +4944,8 @@ | |
} while (page_id.page_no() != slot2->page_no); | |
+fprintf(stderr, "ZZZ btr_estimate_n_rows_in_range_on_level exact: divergence_level=%lu, loop=%lu, n_pages_read=%lu, n_rows_prev=%ld\n", | |
+ divergence_level, loop, n_pages_read, n_rows_on_prev_level); | |
return (n_rows); | |
inexact: | |
@@ -4962,6 +4965,8 @@ | |
n_rows = 10; | |
} | |
+fprintf(stderr, "ZZZ btr_estimate_n_rows_in_range_on_level inexact: divergence_level=%lu, loop=%lu, n_pages_read=%lu, n_rows_prev=%ld\n", | |
+ divergence_level, loop, n_pages_read, n_rows_on_prev_level); | |
return (n_rows); | |
} | |
@@ -5218,6 +5223,7 @@ | |
} | |
} | |
+fprintf(stderr, "ZZZ btr_estimate_n_rows_in_range_low return:1 %lld\n", n_rows); | |
return (n_rows); | |
} | |
@@ -5238,6 +5244,7 @@ | |
const int64_t ret = btr_estimate_n_rows_in_range_low( | |
index, tuple1, mode1, tuple2, mode2, nth_attempt + 1); | |
+fprintf(stderr, "ZZZ btr_estimate_n_rows_in_range_low return:retry %lld\n", n_rows); | |
return (ret); | |
} | |
@@ -5287,7 +5294,7 @@ | |
} | |
} | |
} else if (diverged_lot) { | |
- n_rows = btr_estimate_n_rows_in_range_on_level(index, slot1, slot2, | |
+ n_rows = btr_estimate_n_rows_in_range_on_level(divergence_level, i, index, slot1, slot2, | |
n_rows, &is_n_rows_exact); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment