summaryrefslogtreecommitdiff
path: root/innobase/include
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2005-07-01 21:06:23 +0300
committerunknown <heikki@hundin.mysql.fi>2005-07-01 21:06:23 +0300
commit122bf0b8ae456f172e8b541fd3cb91cf5a658359 (patch)
tree7152a915c4fe6368450dacc31a1566f2246b4a73 /innobase/include
parent3f767b74b33a9612a87c4da3d573e4a61c64d74b (diff)
downloadmariadb-git-122bf0b8ae456f172e8b541fd3cb91cf5a658359.tar.gz
trx0trx.ic, trx0trx.h:
Fix bug in the Bug #3300 bug fix innobase/include/trx0trx.h: Fix bug in the Bug #3300 bug fix innobase/include/trx0trx.ic: Fix bug in the Bug #3300 bug fix
Diffstat (limited to 'innobase/include')
-rw-r--r--innobase/include/trx0trx.h8
-rw-r--r--innobase/include/trx0trx.ic18
2 files changed, 17 insertions, 9 deletions
diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h
index 1b118a86467..c45024c3d59 100644
--- a/innobase/include/trx0trx.h
+++ b/innobase/include/trx0trx.h
@@ -29,16 +29,16 @@ trx_reset_new_rec_lock_info(
/*========================*/
trx_t* trx); /* in: transaction struct */
/*****************************************************************
-Registers that we have set a new record lock on an index. This can only be
-called twice after calling trx_reset_new_rec_lock_info(), since we only have
-space to store 2 indexes! */
+Registers that we have set a new record lock on an index. We only have
+space to store 2 indexes! If this is called more than twice after
+trx_reset_new_rec_lock_info(), then this function does nothing. */
UNIV_INLINE
void
trx_register_new_rec_lock(
/*======================*/
trx_t* trx, /* in: transaction struct */
dict_index_t* index); /* in: trx sets a new record lock on this
- index*/
+ index */
/*****************************************************************
Checks if trx has set a new record lock on an index. */
UNIV_INLINE
diff --git a/innobase/include/trx0trx.ic b/innobase/include/trx0trx.ic
index d23165b74e8..0404104aafe 100644
--- a/innobase/include/trx0trx.ic
+++ b/innobase/include/trx0trx.ic
@@ -52,16 +52,16 @@ trx_reset_new_rec_lock_info(
}
/*****************************************************************
-Registers that we have set a new record lock on an index. This can only be
-called twice after calling trx_reset_new_rec_lock_info(), since we only have
-space to store 2 indexes! */
+Registers that we have set a new record lock on an index. We only have
+space to store 2 indexes! If this is called more than twice after
+trx_reset_new_rec_lock_info(), then this function does nothing. */
UNIV_INLINE
void
trx_register_new_rec_lock(
/*======================*/
trx_t* trx, /* in: transaction struct */
dict_index_t* index) /* in: trx sets a new record lock on this
- index*/
+ index */
{
if (trx->new_rec_locks[0] == NULL) {
trx->new_rec_locks[0] = index;
@@ -69,7 +69,15 @@ trx_register_new_rec_lock(
return;
}
- ut_a(trx->new_rec_locks[1] == NULL);
+ if (trx->new_rec_locks[0] == index) {
+
+ return;
+ }
+
+ if (trx->new_rec_locks[1] != NULL) {
+
+ return;
+ }
trx->new_rec_locks[1] = index;
}