mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Merge branch '10.7' into 10.8
This commit is contained in:
commit
2f70784c2a
347 changed files with 13405 additions and 5522 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
|
|
@ -2642,7 +2642,7 @@ int ha_federatedx::index_read_idx_with_result_set(uchar *buf, uint index,
|
|||
|
||||
if (io->query(sql_query.ptr(), sql_query.length()))
|
||||
{
|
||||
sprintf(error_buffer, "error: %d '%s'",
|
||||
snprintf(error_buffer, sizeof(error_buffer), "error: %d '%s'",
|
||||
io->error_code(), io->error_str());
|
||||
retval= ER_QUERY_ON_FOREIGN_DATA_SOURCE;
|
||||
goto error;
|
||||
|
|
@ -3366,7 +3366,7 @@ static int test_connection(MYSQL_THD thd, federatedx_io *io,
|
|||
|
||||
if ((retval= io->query(str.ptr(), str.length())))
|
||||
{
|
||||
sprintf(buffer, "database: '%s' username: '%s' hostname: '%s'",
|
||||
snprintf(buffer, sizeof(buffer), "database: '%s' username: '%s' hostname: '%s'",
|
||||
share->database, share->username, share->hostname);
|
||||
DBUG_PRINT("info", ("error-code: %d", io->error_code()));
|
||||
my_error(ER_CANT_CREATE_FEDERATED_TABLE, MYF(0), buffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue