Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.5, 10.6, 10.3(EOL), 10.4(EOL), 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
Description
In MDEV-13542, many sources of crash on a corrupted page were fixed, but something in the function btr_cur_open_at_index_side() was missed.
if (height == ULINT_UNDEFINED) { |
/* We are in the root node */ |
|
height = btr_page_get_level(page);
|
ut_a(height >= level);
|
This assertion could fail if a nonzero parameter level was supplied to the function. That is only the case when the inline wrapper function btr_pcur_open_at_index_side() is invoked with level>0, which in turn is only possible in the following functions, related to InnoDB persistent statistics:
- dict_stats_analyze_index_level()
- dict_stats_analyze_index_for_n_prefix()
It would seem to make sense to remove the parameter level from the normal functions, and to write a special function that would be used when computing persistent statistics.
Furthermore, btr_cur_open_at_index_side() currently fails to return DB_CORRUPTION on PAGE_LEVEL mismatch or when from_left ? !page_has_prev(page) : !page_has_next(page) does not hold.
Attachments
Issue Links
- causes
-
MDEV-30289 mtr_t::m_memo is causing frequent memory heap operations
- Closed
-
MDEV-30524 btr_cur_t::open_leaf() opens non-leaf page in BTR_MODIFY_LEAF mode
- Closed
-
MDEV-31120 Duplicate entry allowed into a UNIQUE column
- Closed
- is blocked by
-
MDEV-13542 Crashing on a corrupted page is unhelpful
- Closed