Bug #95040 Duplicately remove locks from lock_sys->prdt_page_hash in btr_compress
Submitted: 17 Apr 2:06 Modified: 24 Apr 13:03
Reporter: zhai weixiang (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[17 Apr 2:06] zhai weixiang
Description:
In function btr_compress:

      lock_mutex_enter();
      lock_prdt_page_free_from_discard(block, lock_sys->prdt_page_hash);
      lock_rec_free_all_from_discard_page(block);
      lock_mutex_exit()

It firstly invoke lock_prdt_page_free_from_discard to discard locks on the page. But actually the following function lock_rec_free_all_from_discard_page() also did the job by invoking ock_rec_free_all_from_discard_page_low(space, page_no,
lock_sys->prdt_page_hash)

How to repeat:
read the code

Suggested fix:
remove lock_prdt_page_free_from_discard
[24 Apr 13:03] Sinisa Milivojevic
Hi,

Thank you for your bug report.

I have analysed the code and concluded that you are correct in your analysis.

Verified as reported.