|
The function lock_update_discard() starts with an incorrect check:
if (!lock_rec_get_first_on_page(lock_sys->rec_hash, block)
|
&& (!lock_rec_get_first_on_page(lock_sys->prdt_hash, block))) {
|
/* No locks exist on page, nothing to do */
|
This fails to account for lock_sys->prdt_page_hash. If such locks exist on the page, they will not be discarded.
Also, the function is unnecessarily traversing both B-tree record locks and predicate locks for the same pages. Predicate locks exist only on spatial index pages, and B-tree record locks only exist on B-tree index pages.
|