mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
trnman_destroy returns void, remove unused variables
storage/maria/trnman.h: trnman_destroy returns void
This commit is contained in:
parent
32739cbbca
commit
bef65f33c2
2 changed files with 5 additions and 6 deletions
|
@ -124,7 +124,7 @@ int trnman_init()
|
|||
this could only be called in the "idle" state - no transaction can be
|
||||
running. See asserts below.
|
||||
*/
|
||||
int trnman_destroy()
|
||||
void trnman_destroy()
|
||||
{
|
||||
DBUG_ASSERT(trid_to_committed_trn.count == 0);
|
||||
DBUG_ASSERT(trnman_active_transactions == 0);
|
||||
|
@ -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)
|
||||
{
|
||||
int res;
|
||||
TRN *free_me= 0;
|
||||
LF_PINS *pins= trn->pins;
|
||||
|
||||
|
@ -303,8 +302,9 @@ void trnman_end_trn(TRN *trn, my_bool commit)
|
|||
*/
|
||||
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->prev= committed_list_max.prev;
|
||||
committed_list_max.prev= trn->prev->next= trn;
|
||||
|
@ -330,11 +330,10 @@ void trnman_end_trn(TRN *trn, my_bool commit)
|
|||
|
||||
while (free_me) // XXX send them to the purge thread
|
||||
{
|
||||
int res;
|
||||
TRN *t= free_me;
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ struct st_transaction
|
|||
extern uint trnman_active_transactions, trnman_allocated_transactions;
|
||||
|
||||
int trnman_init(void);
|
||||
int trnman_destroy(void);
|
||||
void trnman_destroy(void);
|
||||
TRN *trnman_new_trn(pthread_mutex_t *mutex, pthread_cond_t *cond);
|
||||
void trnman_end_trn(TRN *trn, my_bool commit);
|
||||
#define trnman_commit_trn(T) trnman_end_trn(T, TRUE)
|
||||
|
|
Loading…
Reference in a new issue