Commit a81fceaf authored by Marko Mäkelä's avatar Marko Mäkelä

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().
parent 3728b11f
...@@ -5485,6 +5485,8 @@ lock_rec_queue_validate( ...@@ -5485,6 +5485,8 @@ lock_rec_queue_validate(
goto func_exit; goto func_exit;
} }
ut_ad(page_rec_is_leaf(rec));
if (index == NULL) { if (index == NULL) {
/* Nothing we can do */ /* Nothing we can do */
...@@ -5646,11 +5648,13 @@ lock_rec_validate_page( ...@@ -5646,11 +5648,13 @@ lock_rec_validate_page(
if (!sync_check_find(SYNC_FSP)) if (!sync_check_find(SYNC_FSP))
for (i = nth_bit; i < lock_rec_get_n_bits(lock); i++) { 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); rec = page_find_rec_with_heap_no(block->frame, i);
ut_a(rec); 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, offsets = rec_get_offsets(rec, lock->index, offsets,
true, ULINT_UNDEFINED, true, ULINT_UNDEFINED,
&heap); &heap);
...@@ -5886,7 +5890,7 @@ lock_rec_insert_check_and_lock( ...@@ -5886,7 +5890,7 @@ lock_rec_insert_check_and_lock(
{ {
ut_ad(block->frame == page_align(rec)); ut_ad(block->frame == page_align(rec));
ut_ad(!dict_index_is_online_ddl(index) ut_ad(!dict_index_is_online_ddl(index)
|| dict_index_is_clust(index) || index->is_primary()
|| (flags & BTR_CREATE_FLAG)); || (flags & BTR_CREATE_FLAG));
ut_ad(mtr->is_named_space(index->space)); ut_ad(mtr->is_named_space(index->space));
...@@ -5895,7 +5899,8 @@ lock_rec_insert_check_and_lock( ...@@ -5895,7 +5899,8 @@ lock_rec_insert_check_and_lock(
return(DB_SUCCESS); 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; dberr_t err;
lock_t* lock; lock_t* lock;
......
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