summaryrefslogtreecommitdiff
path: root/innobase/trx/trx0trx.c
diff options
context:
space:
mode:
authorunknown <heikki@donna.mysql.fi>2001-06-03 22:58:03 +0300
committerunknown <heikki@donna.mysql.fi>2001-06-03 22:58:03 +0300
commit9d4272bbac3678fbd8594027dd6ad62e69d065f3 (patch)
treece963973f9fcd0dfa6b854cc66c3c0d53fc93ea0 /innobase/trx/trx0trx.c
parent5ec76be436655eefc2a6403b21606fad914ac814 (diff)
downloadmariadb-git-9d4272bbac3678fbd8594027dd6ad62e69d065f3.tar.gz
manual.texi website address change
row0sel.c CHECK TABLE now also for InnoDB, a join speed optimization trx0trx.c CHECK TABLE now also for InnoDB, a join speed optimization rem0cmp.c CHECK TABLE now also for InnoDB, a join speed optimization row0mysql.c CHECK TABLE now also for InnoDB, a join speed optimization page0page.c CHECK TABLE now also for InnoDB, a join speed optimization row0mysql.h CHECK TABLE now also for InnoDB, a join speed optimization trx0trx.h CHECK TABLE now also for InnoDB, a join speed optimization btr0btr.h CHECK TABLE now also for InnoDB, a join speed optimization btr0cur.h CHECK TABLE now also for InnoDB, a join speed optimization btr0pcur.h CHECK TABLE now also for InnoDB, a join speed optimization btr0pcur.ic CHECK TABLE now also for InnoDB, a join speed optimization btr0btr.c CHECK TABLE now also for InnoDB, a join speed optimization btr0cur.c CHECK TABLE now also for InnoDB, a join speed optimization btr0sea.c CHECK TABLE now also for InnoDB, a join speed optimization innodb.result CHECK TABLE now also for InnoDB, a join speed optimization ha_innobase.cc CHECK TABLE now also for InnoDB, a join speed optimization ha_innobase.h CHECK TABLE now also for InnoDB, a join speed optimization sql/ha_innobase.cc: CHECK TABLE now also for InnoDB, a join speed optimization sql/ha_innobase.h: CHECK TABLE now also for InnoDB, a join speed optimization mysql-test/r/innodb.result: CHECK TABLE now also for InnoDB, a join speed optimization innobase/btr/btr0btr.c: CHECK TABLE now also for InnoDB, a join speed optimization innobase/btr/btr0cur.c: CHECK TABLE now also for InnoDB, a join speed optimization innobase/btr/btr0sea.c: CHECK TABLE now also for InnoDB, a join speed optimization innobase/include/btr0btr.h: CHECK TABLE now also for InnoDB, a join speed optimization innobase/include/btr0cur.h: CHECK TABLE now also for InnoDB, a join speed optimization innobase/include/btr0pcur.h: CHECK TABLE now also for InnoDB, a join speed optimization innobase/include/btr0pcur.ic: CHECK TABLE now also for InnoDB, a join speed optimization innobase/include/row0mysql.h: CHECK TABLE now also for InnoDB, a join speed optimization innobase/include/trx0trx.h: CHECK TABLE now also for InnoDB, a join speed optimization innobase/page/page0page.c: CHECK TABLE now also for InnoDB, a join speed optimization innobase/rem/rem0cmp.c: CHECK TABLE now also for InnoDB, a join speed optimization innobase/row/row0mysql.c: CHECK TABLE now also for InnoDB, a join speed optimization innobase/row/row0sel.c: CHECK TABLE now also for InnoDB, a join speed optimization innobase/trx/trx0trx.c: CHECK TABLE now also for InnoDB, a join speed optimization Docs/manual.texi: website address change
Diffstat (limited to 'innobase/trx/trx0trx.c')
-rw-r--r--innobase/trx/trx0trx.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c
index 4841711551b..14108c677eb 100644
--- a/innobase/trx/trx0trx.c
+++ b/innobase/trx/trx0trx.c
@@ -22,6 +22,7 @@ Created 3/26/1996 Heikki Tuuri
#include "read0read.h"
#include "srv0srv.h"
#include "thr0loc.h"
+#include "btr0sea.h"
/* Dummy session used currently in MySQL interface */
sess_t* trx_dummy_sess = NULL;
@@ -63,6 +64,7 @@ trx_create(
trx->dict_operation = FALSE;
trx->n_mysql_tables_in_use = 0;
+ trx->mysql_n_tables_locked = 0;
trx->ignore_duplicates_in_insert = FALSE;
@@ -96,6 +98,8 @@ trx_create(
trx->lock_heap = mem_heap_create_in_buffer(256);
UT_LIST_INIT(trx->trx_locks);
+ trx->has_search_latch = FALSE;
+
trx->read_view_heap = mem_heap_create(256);
trx->read_view = NULL;
@@ -133,6 +137,21 @@ trx_allocate_for_mysql(void)
}
/************************************************************************
+Releases the search latch if trx has reserved it. */
+
+void
+trx_search_latch_release_if_reserved(
+/*=================================*/
+ trx_t* trx) /* in: transaction */
+{
+ if (trx->has_search_latch) {
+ rw_lock_s_unlock(&btr_search_latch);
+
+ trx->has_search_latch = FALSE;
+ }
+}
+
+/************************************************************************
Frees a transaction object. */
void
@@ -149,6 +168,7 @@ trx_free(
ut_a(trx->update_undo == NULL);
ut_a(trx->n_mysql_tables_in_use == 0);
+ ut_a(trx->mysql_n_tables_locked == 0);
if (trx->undo_no_arr) {
trx_undo_arr_free(trx->undo_no_arr);
@@ -160,6 +180,8 @@ trx_free(
ut_a(trx->wait_lock == NULL);
ut_a(UT_LIST_GET_LEN(trx->wait_thrs) == 0);
+ ut_a(!trx->has_search_latch);
+
if (trx->lock_heap) {
mem_heap_free(trx->lock_heap);
}