summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-07-02 04:57:31 +0300
committerunknown <heikki@hundin.mysql.fi>2003-07-02 04:57:31 +0300
commit62389a5a6c0ca4e75605c68c252dc5468a6ef3c3 (patch)
treeca31d3c70cbbc0583d19e916246c793a93bf0b45 /innobase
parent24d93bedaa1dec969f455d6403473b42693cff47 (diff)
downloadmariadb-git-62389a5a6c0ca4e75605c68c252dc5468a6ef3c3.tar.gz
lock0lock.c:
Fix a latching order violation in the previous (2003-06-15) push: could lead to a hang on the btr0sea.c semaphore innobase/lock/lock0lock.c: Fix a latching order violation in the previous (2003-06-15) push: could lead to a hang on the btr0sea.c semaphore
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);
}