diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-11-26 10:10:49 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-11-26 10:10:49 +0200 |
commit | a81fceafb125d10639b613e558546eea6438b45a (patch) | |
tree | 62b09521328ec304b8fb2118ccbbe308902d3433 | |
parent | 3728b11f879634a7ddab39cb951aedceadba80b1 (diff) | |
download | mariadb-git-a81fceafb125d10639b613e558546eea6438b45a.tar.gz |
MDEV-14409 Assertion `page_rec_is_leaf(rec)' failed in lock_rec_validate_page
lock_rec_queue_validate(): Assert page_rec_is_leaf(rec), except when
the record is a page infimum or supremum.
lock_rec_validate_page(): Relax the assertion that failed.
The assertion was reachable when the record lock bitmap was empty.
lock_rec_insert_check_and_lock(): Assert page_is_leaf().
-rw-r--r-- | storage/innobase/lock/lock0lock.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index c2a0494a5d7..1d3e75e9740 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -5485,6 +5485,8 @@ lock_rec_queue_validate( goto func_exit; } + ut_ad(page_rec_is_leaf(rec)); + if (index == NULL) { /* Nothing we can do */ @@ -5646,11 +5648,13 @@ loop: if (!sync_check_find(SYNC_FSP)) for (i = nth_bit; i < lock_rec_get_n_bits(lock); i++) { - if (i == 1 || lock_rec_get_nth_bit(lock, i)) { + if (i == PAGE_HEAP_NO_SUPREMUM + || lock_rec_get_nth_bit(lock, i)) { rec = page_find_rec_with_heap_no(block->frame, i); ut_a(rec); - ut_ad(page_rec_is_leaf(rec)); + ut_ad(!lock_rec_get_nth_bit(lock, i) + || page_rec_is_leaf(rec)); offsets = rec_get_offsets(rec, lock->index, offsets, true, ULINT_UNDEFINED, &heap); @@ -5886,7 +5890,7 @@ lock_rec_insert_check_and_lock( { ut_ad(block->frame == page_align(rec)); ut_ad(!dict_index_is_online_ddl(index) - || dict_index_is_clust(index) + || index->is_primary() || (flags & BTR_CREATE_FLAG)); ut_ad(mtr->is_named_space(index->space)); @@ -5895,7 +5899,8 @@ lock_rec_insert_check_and_lock( return(DB_SUCCESS); } - ut_ad(!dict_table_is_temporary(index->table)); + ut_ad(!index->table->is_temporary()); + ut_ad(page_is_leaf(block->frame)); dberr_t err; lock_t* lock; |