Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5, 10.6, 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.7(EOL)
-
None
Description
There is no need to commit mtr in the following code:
dberr_t
|
row_search_mvcc(...)
|
{
|
...
|
} else if (mtr_has_extra_clust_latch) { |
/* If we have extra cluster latch, we must commit |
 |
mtr if we are moving to the next non-clustered
|
index record, because we could break the latching
|
order if we would access a different clustered
|
index page right away without releasing the previous. */ |
|
btr_pcur_store_position(pcur, &mtr);
|
mtr.commit();
|
mtr_has_extra_clust_latch = FALSE;
|
|
mtr.start();
|
|
if (sel_restore_position_for_mysql(&same_user_rec, |
BTR_SEARCH_LEAF,
|
pcur, moves_up, &mtr)) {
|
goto rec_loop; |
}
|
}
|
|
...
|
}
|
We could create mtr savepoint before requesting clustered index record(mtr_t::get_savepoint()), then release only clustered index page latches(mtr_t::release_s_latch_at_savepoint()) instead of mtr committing.
Attachments
Issue Links
- relates to
-
MDEV-20605 Awaken transaction can miss inserted by other transaction records due to wrong persistent cursor restoration
- Closed