1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge branch '10.4' into 10.5

This commit is contained in:
Oleksandr Byelkin
2021-07-31 23:19:51 +02:00
345 changed files with 7745 additions and 2127 deletions

View File

@ -1080,6 +1080,23 @@ public:
static THD_list_iterator *iterator();
};
/**
A counter of THDs
It must be specified as a first base class of THD, so that increment is
done before any other THD constructors and decrement - after any other THD
destructors.
Destructor unblocks close_conneciton() if there are no more THD's left.
*/
struct THD_count
{
static Atomic_counter<uint32_t> count;
static uint value() { return static_cast<uint>(count); }
THD_count() { count++; }
~THD_count() { count--; }
};
#ifdef MYSQL_SERVER
void free_tmp_table(THD *thd, TABLE *entry);
@ -2268,22 +2285,6 @@ public:
void init() { bill_to = NULL; }
};
/**
A wrapper around thread_count.
It must be specified as a first base class of THD, so that increment is
done before any other THD constructors and decrement - after any other THD
destructors.
Destructor unblocks close_conneciton() if there are no more THD's left.
*/
struct THD_count
{
THD_count() { thread_count++; }
~THD_count() { thread_count--; }
};
/**
@class THD
For each client connection we create a separate thread with THD serving as
@ -3152,6 +3153,9 @@ public:
uint server_status,open_options;
enum enum_thread_type system_thread;
enum backup_stages current_backup_stage;
#ifdef WITH_WSREP
bool wsrep_desynced_backup_stage;
#endif /* WITH_WSREP */
/*
Current or next transaction isolation level.
When a connection is established, the value is taken from