row0sel.c:

  Fix bug: if a unique search from a primary key matched to a delete-marked row, it could return the NEXT row
parent 84e18e15
...@@ -2972,15 +2972,12 @@ rec_loop: ...@@ -2972,15 +2972,12 @@ rec_loop:
/*-------------------------------------------------------------*/ /*-------------------------------------------------------------*/
if (unique_search_from_clust_index && btr_pcur_get_up_match(pcur) /* Note that we cannot trust the up_match value in the cursor at this
== dtuple_get_n_fields(search_tuple)) { place because we can arrive here after moving the cursor! Thus
/* The record matches enough */ we have to recompare rec and search_tuple to determine if they
match enough. */
ut_ad(mode == PAGE_CUR_GE); if (match_mode == ROW_SEL_EXACT) {
#ifdef UNIV_SEARCH_DEBUG
ut_a(0 == cmp_dtuple_rec(search_tuple, rec));
#endif
} else if (match_mode == ROW_SEL_EXACT) {
/* Test if the index record matches completely to search_tuple /* Test if the index record matches completely to search_tuple
in prebuilt: if not, then we return with DB_RECORD_NOT_FOUND */ in prebuilt: if not, then we return with DB_RECORD_NOT_FOUND */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment