diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-09-26 15:16:51 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-09-26 15:16:51 +0300 |
commit | e3fdabd501d9b8efaf0ca65f930af438f7fe993f (patch) | |
tree | 85979482cdaafa3be1cd39ae1eb30c02d3710e41 /storage/federatedx | |
parent | 3c92050d1c907cc548e848d0ab2891a06681ad92 (diff) | |
download | mariadb-git-e3fdabd501d9b8efaf0ca65f930af438f7fe993f.tar.gz |
MDEV-29613 fixup: clang -Wunused-but-set-variable
Diffstat (limited to 'storage/federatedx')
-rw-r--r-- | storage/federatedx/federatedx_txn.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/storage/federatedx/federatedx_txn.cc b/storage/federatedx/federatedx_txn.cc index 220896cc2a4..c434a00805c 100644 --- a/storage/federatedx/federatedx_txn.cc +++ b/storage/federatedx/federatedx_txn.cc @@ -57,10 +57,12 @@ 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"); - + DBUG_ASSERT(!server->use_count); DBUG_PRINT("info",("use count: %u connections: %u", server->use_count, server->io_count)); @@ -84,9 +86,11 @@ 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, txn_list ? "active": "empty")); DBUG_VOID_RETURN; @@ -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++) + /* return any inactive and idle connections to the server */ + 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)); |