MySQL 8.4.3
Source Code Documentation
rpl_gtid_persist.cc File Reference
#include "sql/rpl_gtid_persist.h"
#include "my_config.h"
#include "mysql/my_loglevel.h"
#include "sql/derror.h"
#include <unistd.h>
#include <list>
#include "my_base.h"
#include "my_command.h"
#include "my_dbug.h"
#include "my_sys.h"
#include "my_thread.h"
#include "mysql/binlog/event/control_events.h"
#include "mysql/components/services/log_builtins.h"
#include "mysql/psi/mysql_cond.h"
#include "mysql/psi/mysql_mutex.h"
#include "mysql/psi/mysql_thread.h"
#include "mysql/strings/m_ctype.h"
#include "mysql/thread_type.h"
#include "sql/auth/sql_security_ctx.h"
#include "sql/current_thd.h"
#include "sql/debug_sync.h"
#include "sql/field.h"
#include "sql/handler.h"
#include "sql/key.h"
#include "sql/log.h"
#include "sql/mysqld.h"
#include "sql/query_options.h"
#include "sql/replication.h"
#include "sql/sql_base.h"
#include "sql/sql_const.h"
#include "sql/sql_error.h"
#include "sql/sql_lex.h"
#include "sql/sql_parse.h"
#include "sql/system_variables.h"
#include "sql_string.h"
#include "string_with_len.h"

Functions

static void init_thd (THD **p_thd)
 Initialize a new THD. More...
 
static void deinit_thd (THD *thd)
 Release resourses for the thread and restores the system_thread information. More...
 
static int dbug_test_on_compress (THD *thd)
 Simulate error and crash in the middle of the transaction of compressing gtid_executed table. More...
 
static void * compress_gtid_table (void *p_thd)
 The main function of the compression thread. More...
 
void create_compress_gtid_table_thread ()
 Create the compression thread to compress gtid_executed table. More...
 
void terminate_compress_gtid_table_thread ()
 Terminate the compression thread. More...
 

Variables

my_thread_handle compress_thread_id
 
static bool terminate_compress_thread = false
 
static bool should_compress = false
 

Function Documentation

◆ compress_gtid_table()

static void * compress_gtid_table ( void *  p_thd)
static

The main function of the compression thread.

  • compress the gtid_executed table when get a compression signal.
Parameters
p_thdThread requesting to compress the table
Returns
Return values
0OK. always, the compression thread will swallow any error for going to wait for next compression signal until it is terminated.

◆ create_compress_gtid_table_thread()

void create_compress_gtid_table_thread ( )

Create the compression thread to compress gtid_executed table.

◆ dbug_test_on_compress()

static int dbug_test_on_compress ( THD thd)
static

Simulate error and crash in the middle of the transaction of compressing gtid_executed table.

Parameters
thdThread requesting to compress the table
Returns
Return values
0OK.
-1Error.

◆ deinit_thd()

static void deinit_thd ( THD thd)
static

Release resourses for the thread and restores the system_thread information.

Parameters
thdThread requesting to be destroyed

◆ init_thd()

static void init_thd ( THD **  p_thd)
static

Initialize a new THD.

Parameters
p_thdPointer to pointer to thread structure

◆ terminate_compress_gtid_table_thread()

void terminate_compress_gtid_table_thread ( )

Terminate the compression thread.

Variable Documentation

◆ compress_thread_id

my_thread_handle compress_thread_id

◆ should_compress

bool should_compress = false
static

◆ terminate_compress_thread

bool terminate_compress_thread = false
static