diff --git a/lock/lock0lock.c b/lock/lock0lock.c index 736198dc346..9ff423d50b4 100644 --- a/lock/lock0lock.c +++ b/lock/lock0lock.c @@ -4926,7 +4926,7 @@ lock_rec_insert_check_and_lock( } trx = thr_get_trx(thr); - next_rec = page_rec_get_next((rec_t*) rec); + next_rec = page_rec_get_next_const(rec); next_rec_heap_no = page_rec_get_heap_no(next_rec); lock_mutex_enter_kernel();