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) 2007 Google Inc.
|
||||||
Copyright (c) 2008, 2013, Oracle and/or its affiliates.
|
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
|
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
|
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;
|
Tranx_node *curr_node, *next_node;
|
||||||
|
|
||||||
/* Delete all transaction nodes before the confirmation point. */
|
/* Delete all transaction nodes before the confirmation point. */
|
||||||
|
#ifdef DBUG_TRACE
|
||||||
int n_frees = 0;
|
int n_frees = 0;
|
||||||
|
#endif
|
||||||
curr_node = m_trx_front;
|
curr_node = m_trx_front;
|
||||||
while (curr_node != new_front)
|
while (curr_node != new_front)
|
||||||
{
|
{
|
||||||
next_node = curr_node->next;
|
next_node = curr_node->next;
|
||||||
|
#ifdef DBUG_TRACE
|
||||||
n_frees++;
|
n_frees++;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Remove the node from the hash table. */
|
/* Remove the node from the hash table. */
|
||||||
unsigned int hash_val = get_hash_value(curr_node->log_name, curr_node->log_pos);
|
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)
|
void federatedx_txn::close(FEDERATEDX_SERVER *server)
|
||||||
{
|
{
|
||||||
|
#ifdef DBUG_TRACE
|
||||||
uint count= 0;
|
uint count= 0;
|
||||||
|
#endif
|
||||||
federatedx_io *io, **iop;
|
federatedx_io *io, **iop;
|
||||||
DBUG_ENTER("federatedx_txn::close");
|
DBUG_ENTER("federatedx_txn::close");
|
||||||
|
|
||||||
@ -84,7 +86,9 @@ void federatedx_txn::close(FEDERATEDX_SERVER *server)
|
|||||||
{
|
{
|
||||||
server->idle_list= io->idle_next;
|
server->idle_list= io->idle_next;
|
||||||
delete io;
|
delete io;
|
||||||
|
#ifdef DBUG_TRACE
|
||||||
count++;
|
count++;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
DBUG_PRINT("info",("closed %u connections, txn_list: %s", count,
|
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()
|
void federatedx_txn::release_scan()
|
||||||
{
|
{
|
||||||
|
#ifdef DBUG_TRACE
|
||||||
uint count= 0, returned= 0;
|
uint count= 0, returned= 0;
|
||||||
|
#endif
|
||||||
federatedx_io *io, **pio;
|
federatedx_io *io, **pio;
|
||||||
DBUG_ENTER("federatedx_txn::release_scan");
|
DBUG_ENTER("federatedx_txn::release_scan");
|
||||||
|
|
||||||
/* return any inactive and idle connections to the server */
|
/* 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)
|
if (io->active || io->busy)
|
||||||
pio= &io->txn_next;
|
pio= &io->txn_next;
|
||||||
@ -196,8 +202,13 @@ void federatedx_txn::release_scan()
|
|||||||
io->idle_next= server->idle_list;
|
io->idle_next= server->idle_list;
|
||||||
server->idle_list= io;
|
server->idle_list= io;
|
||||||
mysql_mutex_unlock(&server->mutex);
|
mysql_mutex_unlock(&server->mutex);
|
||||||
|
#ifdef DBUG_TRACE
|
||||||
returned++;
|
returned++;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
#ifdef DBUG_TRACE
|
||||||
|
count++;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
DBUG_PRINT("info",("returned %u of %u connections(s)", returned, count));
|
DBUG_PRINT("info",("returned %u of %u connections(s)", returned, count));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user