summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
Diffstat (limited to 'innobase')
-rw-r--r--innobase/lock/lock0lock.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c
index fecb1f95c68..397a8158bee 100644
--- a/innobase/lock/lock0lock.c
+++ b/innobase/lock/lock0lock.c
@@ -579,6 +579,10 @@ lock_clust_rec_cons_read_sees(
ut_ad(index->type & DICT_CLUSTERED);
ut_ad(page_rec_is_user_rec(rec));
+ /* NOTE that we call this function while holding the search
+ system latch. To obey the latching order we must NOT reserve the
+ kernel mutex here! */
+
trx_id = row_get_rec_trx_id(rec, index);
if (read_view_sees_trx_id(view, trx_id)) {
@@ -586,15 +590,6 @@ lock_clust_rec_cons_read_sees(
return(TRUE);
}
- if (!lock_check_trx_id_sanity(trx_id, rec, index, FALSE)) {
- /* Trying to get the 'history' of a corrupt record is bound
- to fail: let us try to use the record itself in the query */
- fprintf(stderr,
-"InnoDB: We try to access the corrupt record in the query anyway.\n");
-
- return(TRUE);
- }
-
return(FALSE);
}
@@ -624,6 +619,10 @@ lock_sec_rec_cons_read_sees(
ut_ad(!(index->type & DICT_CLUSTERED));
ut_ad(page_rec_is_user_rec(rec));
+ /* NOTE that we might call this function while holding the search
+ system latch. To obey the latching order we must NOT reserve the
+ kernel mutex here! */
+
if (recv_recovery_is_on()) {
return(FALSE);
@@ -633,16 +632,6 @@ lock_sec_rec_cons_read_sees(
if (ut_dulint_cmp(max_trx_id, view->up_limit_id) >= 0) {
- if (!lock_check_trx_id_sanity(max_trx_id, rec, index, FALSE)) {
- /* Trying to get the 'history' of a corrupt record is
- bound to fail: let us try to use the record itself in
- the query */
- fprintf(stderr,
-"InnoDB: We try to access the corrupt record in the query anyway.\n");
-
- return(TRUE);
- }
-
return(FALSE);
}