summaryrefslogtreecommitdiff
path: root/storage/pbxt
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-05-16 14:05:45 +0300
committerMichael Widenius <monty@askmonty.org>2011-05-16 14:05:45 +0300
commitf458e198c0bea67c6a3787738108bbfb139639bd (patch)
treee01d8c096a63bacfb5895de6e55d011d666e9d38 /storage/pbxt
parent8c5e18c9cfde61197a9f653efa08450ae9a6ce0a (diff)
parent19f0d6b2d9930f83688943b8f98a8b7397584df9 (diff)
downloadmariadb-git-f458e198c0bea67c6a3787738108bbfb139639bd.tar.gz
Merge with 5.2
Diffstat (limited to 'storage/pbxt')
-rw-r--r--storage/pbxt/src/cache_xt.cc5
-rw-r--r--storage/pbxt/src/heap_xt.cc1
-rw-r--r--storage/pbxt/src/lock_xt.cc5
-rw-r--r--storage/pbxt/src/lock_xt.h1
-rw-r--r--storage/pbxt/src/xaction_xt.cc1
5 files changed, 12 insertions, 1 deletions
diff --git a/storage/pbxt/src/cache_xt.cc b/storage/pbxt/src/cache_xt.cc
index 24e42d9e984..090250dd802 100644
--- a/storage/pbxt/src/cache_xt.cc
+++ b/storage/pbxt/src/cache_xt.cc
@@ -717,6 +717,11 @@ xtPublic void xt_ind_exit(XTThreadPtr self)
ind_handle_exit(self);
if (ind_cac_globals.cg_blocks) {
+ XTIndBlockPtr block = ind_cac_globals.cg_blocks;
+ for (u_int i=0; i<ind_cac_globals.cg_block_count; i++) {
+ XT_IPAGE_FREE_LOCK(self, &block->cb_lock);
+ block++;
+ }
xt_free(self, ind_cac_globals.cg_blocks);
ind_cac_globals.cg_blocks = NULL;
xt_free_mutex(&ind_cac_globals.cg_lock);
diff --git a/storage/pbxt/src/heap_xt.cc b/storage/pbxt/src/heap_xt.cc
index a4e3fec1611..11331f6489f 100644
--- a/storage/pbxt/src/heap_xt.cc
+++ b/storage/pbxt/src/heap_xt.cc
@@ -109,6 +109,7 @@ xtPublic void xt_heap_release(XTThreadPtr self, XTHeapPtr hp)
if (hp->h_finalize)
(*hp->h_finalize)(self, hp);
xt_spinlock_unlock(&hp->h_lock);
+ xt_spinlock_free(NULL, &hp->h_lock);
xt_free(self, hp);
return;
}
diff --git a/storage/pbxt/src/lock_xt.cc b/storage/pbxt/src/lock_xt.cc
index 5dbba9db83a..e4a38716845 100644
--- a/storage/pbxt/src/lock_xt.cc
+++ b/storage/pbxt/src/lock_xt.cc
@@ -726,11 +726,15 @@ xtBool xt_init_row_locks(XTRowLocksPtr rl)
rl->rl_groups[i].lg_list_in_use = 0;
rl->rl_groups[i].lg_list = NULL;
}
+ rl->valid = 1;
return OK;
}
void xt_exit_row_locks(XTRowLocksPtr rl)
{
+ if (!rl->valid)
+ return;
+
for (int i=0; i<XT_ROW_LOCK_GROUP_COUNT; i++) {
xt_spinlock_free(NULL, &rl->rl_groups[i].lg_lock);
rl->rl_groups[i].lg_wait_queue = NULL;
@@ -741,6 +745,7 @@ void xt_exit_row_locks(XTRowLocksPtr rl)
rl->rl_groups[i].lg_list = NULL;
}
}
+ rl->valid = 0;
}
/*
diff --git a/storage/pbxt/src/lock_xt.h b/storage/pbxt/src/lock_xt.h
index 4e5af648c37..28737478d48 100644
--- a/storage/pbxt/src/lock_xt.h
+++ b/storage/pbxt/src/lock_xt.h
@@ -658,6 +658,7 @@ typedef struct XTLockGroup {
struct XTLockWait;
typedef struct XTRowLocks {
+ int valid;
XTLockGroupRec rl_groups[XT_ROW_LOCK_GROUP_COUNT];
void xt_cancel_temp_lock(XTLockWaitPtr lw);
diff --git a/storage/pbxt/src/xaction_xt.cc b/storage/pbxt/src/xaction_xt.cc
index c5f07eedabf..fd7ae88a4ae 100644
--- a/storage/pbxt/src/xaction_xt.cc
+++ b/storage/pbxt/src/xaction_xt.cc
@@ -1123,7 +1123,6 @@ xtPublic void xt_xn_init_db(XTThreadPtr self, XTDatabaseHPtr db)
*/
for (u_int i=0; i<XT_XN_NO_OF_SEGMENTS; i++) {
seg = &db->db_xn_idx[i];
- XT_XACT_INIT_LOCK(self, &seg->xs_tab_lock);
seg->xs_last_xn_id = db->db_xn_curr_id;
}