MDEV-29613 fixup: clang -Wunused-but-set-variable
This commit is contained in:
parent
3c92050d1c
commit
e3fdabd501
@ -1,6 +1,6 @@
|
||||
/* Copyright (C) 2007 Google Inc.
|
||||
Copyright (c) 2008, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2011, 2016, MariaDB
|
||||
Copyright (c) 2011, 2022, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -275,12 +275,16 @@ void Active_tranx::clear_active_tranx_nodes(const char *log_file_name,
|
||||
Tranx_node *curr_node, *next_node;
|
||||
|
||||
/* Delete all transaction nodes before the confirmation point. */
|
||||
#ifdef DBUG_TRACE
|
||||
int n_frees = 0;
|
||||
#endif
|
||||
curr_node = m_trx_front;
|
||||
while (curr_node != new_front)
|
||||
{
|
||||
next_node = curr_node->next;
|
||||
#ifdef DBUG_TRACE
|
||||
n_frees++;
|
||||
#endif
|
||||
|
||||
/* Remove the node from the hash table. */
|
||||
unsigned int hash_val = get_hash_value(curr_node->log_name, curr_node->log_pos);
|
||||
|
@ -57,7 +57,9 @@ federatedx_txn::~federatedx_txn()
|
||||
|
||||
void federatedx_txn::close(FEDERATEDX_SERVER *server)
|
||||
{
|
||||
#ifdef DBUG_TRACE
|
||||
uint count= 0;
|
||||
#endif
|
||||
federatedx_io *io, **iop;
|
||||
DBUG_ENTER("federatedx_txn::close");
|
||||
|
||||
@ -84,7 +86,9 @@ void federatedx_txn::close(FEDERATEDX_SERVER *server)
|
||||
{
|
||||
server->idle_list= io->idle_next;
|
||||
delete io;
|
||||
#ifdef DBUG_TRACE
|
||||
count++;
|
||||
#endif
|
||||
}
|
||||
|
||||
DBUG_PRINT("info",("closed %u connections, txn_list: %s", count,
|
||||
@ -172,12 +176,14 @@ void federatedx_txn::release(federatedx_io **ioptr)
|
||||
|
||||
void federatedx_txn::release_scan()
|
||||
{
|
||||
#ifdef DBUG_TRACE
|
||||
uint count= 0, returned= 0;
|
||||
#endif
|
||||
federatedx_io *io, **pio;
|
||||
DBUG_ENTER("federatedx_txn::release_scan");
|
||||
|
||||
/* return any inactive and idle connections to the server */
|
||||
for (pio= &txn_list; (io= *pio); count++)
|
||||
for (pio= &txn_list; (io= *pio);)
|
||||
{
|
||||
if (io->active || io->busy)
|
||||
pio= &io->txn_next;
|
||||
@ -196,8 +202,13 @@ void federatedx_txn::release_scan()
|
||||
io->idle_next= server->idle_list;
|
||||
server->idle_list= io;
|
||||
mysql_mutex_unlock(&server->mutex);
|
||||
#ifdef DBUG_TRACE
|
||||
returned++;
|
||||
#endif
|
||||
}
|
||||
#ifdef DBUG_TRACE
|
||||
count++;
|
||||
#endif
|
||||
}
|
||||
DBUG_PRINT("info",("returned %u of %u connections(s)", returned, count));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user