summaryrefslogtreecommitdiff
path: root/innobase/row/row0vers.c
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2003-06-15 12:03:01 +0200
committerunknown <guilhem@mysql.com>2003-06-15 12:03:01 +0200
commit0783f9001340ff848922d9ad60a9eef2c6b0dbac (patch)
treeb3ab762fd199b4cea5346729632829716fbe1c0a /innobase/row/row0vers.c
parent292f91e83d954e2bd23c7f15fc26d0823157594f (diff)
parent8fe7e029c211dc3856fd3a8274f5fbbc95f12e3b (diff)
downloadmariadb-git-0783f9001340ff848922d9ad60a9eef2c6b0dbac.tar.gz
Merge gbichot@213.136.52.20:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
Diffstat (limited to 'innobase/row/row0vers.c')
-rw-r--r--innobase/row/row0vers.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/innobase/row/row0vers.c b/innobase/row/row0vers.c
index cd8b18e5e12..91aaba40812 100644
--- a/innobase/row/row0vers.c
+++ b/innobase/row/row0vers.c
@@ -27,6 +27,7 @@ Created 2/6/1997 Heikki Tuuri
#include "row0upd.h"
#include "rem0cmp.h"
#include "read0read.h"
+#include "lock0lock.h"
/*********************************************************************
Finds out if an active transaction has inserted or modified a secondary
@@ -111,6 +112,14 @@ row_vers_impl_x_locked_off_kernel(
return(NULL);
}
+ if (!lock_check_trx_id_sanity(trx_id, clust_rec, clust_index, TRUE)) {
+ /* Corruption noticed: try to avoid a crash by returning */
+
+ mtr_commit(&mtr);
+
+ return(NULL);
+ }
+
/* We look up if some earlier version of the clustered index record
would require rec to be in a different state (delete marked or
unmarked, or not existing). If there is such a version, then rec was
@@ -177,7 +186,8 @@ row_vers_impl_x_locked_off_kernel(
/* If we get here, we know that the trx_id transaction is
still active and it has modified prev_version. Let us check
- if prev_version would require rec to be in a different state. */
+ if prev_version would require rec to be in a different
+ state. */
vers_del = rec_get_deleted_flag(prev_version);