Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
Description
The function row_sel_get_clust_rec_for_mysql() is invoking row_sel_sec_rec_is_for_clust_rec() even at the READ UNCOMMITTED isolation level, where we should just assume that a non-delete-marked secondary index record does exist.
One of the two calls is preceded by a condition that refers to the isolation level, but that condition seems wrong:
if (clust_rec |
&& (old_vers
|
|| trx->isolation_level <= TRX_ISO_READ_UNCOMMITTED
|
|| rec_get_deleted_flag(rec, dict_table_is_comp(
|
sec_index->table)))
|
&& !row_sel_sec_rec_is_for_clust_rec(
|
rec, sec_index, clust_rec, clust_index)) {
|
clust_rec = NULL;
|
Because the lowest value for trx->isolation_level is
#define TRX_ISO_READ_UNCOMMITTED 0 |
the condition <= actually is equivalent to ==.
I think that for READ UNCOMMITTED, we should only filter secondary index records by the delete-mark flag. If a record is delete-marked, pretend that it does not exist. This is exactly what we should already be doing for clustered index records.
Attachments
Issue Links
- relates to
-
MDEV-17823 Assertion `!rec_offs_nth_default(clust_offs, clust_pos)' failed in row_sel_sec_rec_is_for_clust_rec
- Closed