summaryrefslogtreecommitdiff
path: root/storage/maria/trnman.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/maria/trnman.c')
-rw-r--r--storage/maria/trnman.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/storage/maria/trnman.c b/storage/maria/trnman.c
index daccf3550c2..3ada502988a 100644
--- a/storage/maria/trnman.c
+++ b/storage/maria/trnman.c
@@ -60,7 +60,6 @@ static LF_HASH trid_to_trn;
static TRN **short_trid_to_active_trn;
/* locks for short_trid_to_active_trn and pool */
-static my_atomic_rwlock_t LOCK_short_trid_to_trn, LOCK_pool;
static my_bool default_trnman_end_trans_hook(TRN *, my_bool, my_bool);
static void trnman_free_trn(TRN *);
@@ -191,8 +190,6 @@ int trnman_init(TrID initial_trid)
0, 0, trn_get_hash_key, 0);
DBUG_PRINT("info", ("mysql_mutex_init LOCK_trn_list"));
mysql_mutex_init(key_LOCK_trn_list, &LOCK_trn_list, MY_MUTEX_INIT_FAST);
- my_atomic_rwlock_init(&LOCK_short_trid_to_trn);
- my_atomic_rwlock_init(&LOCK_pool);
DBUG_RETURN(0);
}
@@ -226,8 +223,6 @@ void trnman_destroy()
lf_hash_destroy(&trid_to_trn);
DBUG_PRINT("info", ("mysql_mutex_destroy LOCK_trn_list"));
mysql_mutex_destroy(&LOCK_trn_list);
- my_atomic_rwlock_destroy(&LOCK_short_trid_to_trn);
- my_atomic_rwlock_destroy(&LOCK_pool);
my_free(short_trid_to_active_trn+1);
short_trid_to_active_trn= NULL;
@@ -257,7 +252,6 @@ static uint get_short_trid(TRN *trn)
for ( ; !res ; i= 1)
{
- my_atomic_rwlock_wrlock(&LOCK_short_trid_to_trn);
for ( ; i <= SHORT_TRID_MAX; i++) /* the range is [1..SHORT_TRID_MAX] */
{
void *tmp= NULL;
@@ -268,7 +262,6 @@ static uint get_short_trid(TRN *trn)
break;
}
}
- my_atomic_rwlock_wrunlock(&LOCK_short_trid_to_trn);
}
return res;
}
@@ -306,11 +299,9 @@ TRN *trnman_new_trn(WT_THD *wt)
Popping an unused TRN from the pool
(ABA isn't possible, we're behind a mutex
*/
- my_atomic_rwlock_wrlock(&LOCK_pool);
while (tmp.trn && !my_atomic_casptr((void **)(char*) &pool, &tmp.v,
(void *)tmp.trn->next))
/* no-op */;
- my_atomic_rwlock_wrunlock(&LOCK_pool);
/* Nothing in the pool ? Allocate a new one */
if (!(trn= tmp.trn))
@@ -493,9 +484,7 @@ my_bool trnman_end_trn(TRN *trn, my_bool commit)
note that we don't own trn anymore, it may be in a shared list now.
Thus, we cannot dereference it, and must use cached_short_id below.
*/
- my_atomic_rwlock_rdlock(&LOCK_short_trid_to_trn);
my_atomic_storeptr((void **)&short_trid_to_active_trn[cached_short_id], 0);
- my_atomic_rwlock_rdunlock(&LOCK_short_trid_to_trn);
/*
we, under the mutex, removed going-in-free_me transactions from the
@@ -545,7 +534,6 @@ static void trnman_free_trn(TRN *trn)
tmp.trn= pool;
- my_atomic_rwlock_wrlock(&LOCK_pool);
do
{
/*
@@ -554,7 +542,6 @@ static void trnman_free_trn(TRN *trn)
*/
*(TRN * volatile *)&(trn->next)= tmp.trn;
} while (!my_atomic_casptr((void **)(char*)&pool, &tmp.v, trn));
- my_atomic_rwlock_wrunlock(&LOCK_pool);
}
/*