Commit bef65f33 authored by unknown's avatar unknown

trnman_destroy returns void, remove unused variables


storage/maria/trnman.h:
  trnman_destroy returns void
parent 32739cbb
...@@ -124,7 +124,7 @@ int trnman_init() ...@@ -124,7 +124,7 @@ int trnman_init()
this could only be called in the "idle" state - no transaction can be this could only be called in the "idle" state - no transaction can be
running. See asserts below. running. See asserts below.
*/ */
int trnman_destroy() void trnman_destroy()
{ {
DBUG_ASSERT(trid_to_committed_trn.count == 0); DBUG_ASSERT(trid_to_committed_trn.count == 0);
DBUG_ASSERT(trnman_active_transactions == 0); DBUG_ASSERT(trnman_active_transactions == 0);
...@@ -265,7 +265,6 @@ TRN *trnman_new_trn(pthread_mutex_t *mutex, pthread_cond_t *cond) ...@@ -265,7 +265,6 @@ TRN *trnman_new_trn(pthread_mutex_t *mutex, pthread_cond_t *cond)
*/ */
void trnman_end_trn(TRN *trn, my_bool commit) void trnman_end_trn(TRN *trn, my_bool commit)
{ {
int res;
TRN *free_me= 0; TRN *free_me= 0;
LF_PINS *pins= trn->pins; LF_PINS *pins= trn->pins;
...@@ -303,8 +302,9 @@ void trnman_end_trn(TRN *trn, my_bool commit) ...@@ -303,8 +302,9 @@ void trnman_end_trn(TRN *trn, my_bool commit)
*/ */
if (commit && active_list_min.next != &active_list_max) if (commit && active_list_min.next != &active_list_max)
{ {
trn->commit_trid= global_trid_generator; int res;
trn->commit_trid= global_trid_generator;
trn->next= &committed_list_max; trn->next= &committed_list_max;
trn->prev= committed_list_max.prev; trn->prev= committed_list_max.prev;
committed_list_max.prev= trn->prev->next= trn; committed_list_max.prev= trn->prev->next= trn;
...@@ -330,11 +330,10 @@ void trnman_end_trn(TRN *trn, my_bool commit) ...@@ -330,11 +330,10 @@ void trnman_end_trn(TRN *trn, my_bool commit)
while (free_me) // XXX send them to the purge thread while (free_me) // XXX send them to the purge thread
{ {
int res;
TRN *t= free_me; TRN *t= free_me;
free_me= free_me->next; free_me= free_me->next;
res= lf_hash_delete(&trid_to_committed_trn, pins, &t->trid, sizeof(TrID)); lf_hash_delete(&trid_to_committed_trn, pins, &t->trid, sizeof(TrID));
trnman_free_trn(t); trnman_free_trn(t);
} }
......
...@@ -44,7 +44,7 @@ struct st_transaction ...@@ -44,7 +44,7 @@ struct st_transaction
extern uint trnman_active_transactions, trnman_allocated_transactions; extern uint trnman_active_transactions, trnman_allocated_transactions;
int trnman_init(void); int trnman_init(void);
int trnman_destroy(void); void trnman_destroy(void);
TRN *trnman_new_trn(pthread_mutex_t *mutex, pthread_cond_t *cond); TRN *trnman_new_trn(pthread_mutex_t *mutex, pthread_cond_t *cond);
void trnman_end_trn(TRN *trn, my_bool commit); void trnman_end_trn(TRN *trn, my_bool commit);
#define trnman_commit_trn(T) trnman_end_trn(T, TRUE) #define trnman_commit_trn(T) trnman_end_trn(T, TRUE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment