mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
MDEV-37360: SIGSEGV in srv_printf_innodb_monitor
srv_printf_innodb_monitor(): After acquiring a latch, abort the iteration if innodb_adaptive_hash_index=OFF. If the adaptive hash index was disabled in a concurrently executing thread, btr_search_sys_t::partition::clear() would have freed part->heap, leading to us dereferencing a null pointer. Reviewed by: Thirunarayanan Balathandayuthapani Tested by: Saahil Alam
This commit is contained in:
parent
c5169a3510
commit
9ffec4c1f3
1 changed files with 5 additions and 1 deletions
|
|
@ -804,9 +804,13 @@ srv_printf_innodb_monitor(
|
|||
ibuf_print(file);
|
||||
|
||||
#ifdef BTR_CUR_HASH_ADAPT
|
||||
for (ulint i = 0; i < btr_ahi_parts && btr_search_enabled; ++i) {
|
||||
for (ulint i = 0; i < btr_ahi_parts; ++i) {
|
||||
const auto part= &btr_search_sys.parts[i];
|
||||
part->latch.rd_lock(SRW_LOCK_CALL);
|
||||
if (!btr_search_enabled) {
|
||||
part->latch.rd_unlock();
|
||||
break;
|
||||
}
|
||||
ut_ad(part->heap->type == MEM_HEAP_FOR_BTR_SEARCH);
|
||||
fprintf(file, "Hash table size " ULINTPF
|
||||
", node heap has " ULINTPF " buffer(s)\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue