MySQL 8.4.2
Source Code Documentation
binlog.h File Reference
#include <string.h>
#include <sys/types.h>
#include <time.h>
#include <atomic>
#include <string_view>
#include <utility>
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_io.h"
#include "my_sharedlib.h"
#include "my_sys.h"
#include "mysql/binlog/event/binlog_event.h"
#include "mysql/binlog/event/trx_boundary_parser.h"
#include "mysql/components/services/bits/mysql_cond_bits.h"
#include "mysql/components/services/bits/mysql_mutex_bits.h"
#include "mysql/components/services/bits/psi_cond_bits.h"
#include "mysql/components/services/bits/psi_file_bits.h"
#include "mysql/components/services/bits/psi_mutex_bits.h"
#include "mysql/psi/mysql_cond.h"
#include "mysql/psi/mysql_mutex.h"
#include "mysql/udf_registration_types.h"
#include "mysql_com.h"
#include "sql/binlog_reader.h"
#include "sql/rpl_commit_stage_manager.h"
#include "sql/rpl_trx_tracking.h"
#include "sql/tc_log.h"
#include "sql/transaction_info.h"
#include "thr_mutex.h"

Go to the source code of this file.

Classes

struct  Binlog_user_var_event
 
struct  LOG_INFO
 
class  MYSQL_BIN_LOG
 
struct  LOAD_FILE_INFO
 

Macros

#define MAX_LOG_UNIQUE_FN_EXT   0x7FFFFFFF
 
#define MAX_ALLOWED_FN_EXT_RESET_BIN_LOGS   2000000000
 
#define LOG_INFO_EOF   -1
 
#define LOG_INFO_IO   -2
 
#define LOG_INFO_INVALID   -3
 
#define LOG_INFO_SEEK   -4
 
#define LOG_INFO_MEM   -6
 
#define LOG_INFO_FATAL   -7
 
#define LOG_INFO_IN_USE   -8
 
#define LOG_INFO_EMFILE   -9
 
#define LOG_INFO_BACKUP_LOCK   -10
 
#define LOG_INFO_NOT_IN_USE   -11
 
#define LOG_CLOSE_INDEX   1
 
#define LOG_CLOSE_TO_BE_OPENED   2
 
#define LOG_CLOSE_STOP_EVENT   4
 

Typedefs

typedef int64 query_id_t
 

Functions

bool is_transaction_empty (THD *thd)
 Check if the the transaction is empty. More...
 
int check_trx_rw_engines (THD *thd, Transaction_ctx::enum_trx_scope trx_scope)
 Check if the transaction has no rw flag set for any of the storage engines. More...
 
bool is_empty_transaction_in_binlog_cache (const THD *thd)
 Check if at least one of transacaction and statement binlog caches contains an empty transaction, other one is empty or contains an empty transaction, which has two binlog events "BEGIN" and "COMMIT". More...
 
bool trans_has_updated_trans_table (const THD *thd)
 This function checks if a transactional table was updated by the current transaction. More...
 
bool stmt_has_updated_trans_table (Ha_trx_info_list const &ha_list)
 This function checks if a transactional table was updated by the current statement. More...
 
bool ending_trans (THD *thd, const bool all)
 This function checks if a transaction, either a multi-statement or a single statement transaction is about to commit or not. More...
 
bool ending_single_stmt_trans (THD *thd, const bool all)
 This function checks if a single statement transaction is about to commit or not. More...
 
bool trans_cannot_safely_rollback (const THD *thd)
 This function checks if a transaction cannot be rolled back safely. More...
 
bool stmt_cannot_safely_rollback (const THD *thd)
 This function checks if current statement cannot be rollded back safely. More...
 
int log_loaded_block (IO_CACHE *file)
 Load data's io cache specific hook to be executed before a chunk of data is being read into the cache's buffer The function instantiates and writes into the binlog replication events along LOAD DATA processing. More...
 
bool purge_source_logs_to_file (THD *thd, const char *to_log)
 Purges the binary log files up to the file name passed as a paramenter. More...
 
bool purge_source_logs_before_date (THD *thd, time_t purge_time)
 Execute a PURGE BINARY LOGS BEFORE <date> command. More...
 
bool show_binlog_events (THD *thd, MYSQL_BIN_LOG *binary_log)
 
bool mysql_show_binlog_events (THD *thd)
 Execute a SHOW BINLOG EVENTS statement. More...
 
void check_binlog_cache_size (THD *thd)
 Checks if the BINLOG_CACHE_SIZE's value is greater than MAX_BINLOG_CACHE_SIZE. More...
 
void check_binlog_stmt_cache_size (THD *thd)
 Checks if the BINLOG_STMT_CACHE_SIZE's value is greater than MAX_BINLOG_STMT_CACHE_SIZE. More...
 
bool binlog_enabled ()
 Check whether binlog_hton has valid slot and enabled. More...
 
int query_error_code (const THD *thd, bool not_killed)
 
bool normalize_binlog_name (char *to, const char *from, bool is_relay_log)
 Turns a relative log binary log path into a full path, based on the opt_bin_logname or opt_relay_logname. More...
 

Variables

MYSQL_PLUGIN_IMPORT MYSQL_BIN_LOG mysql_bin_log
 
const char * log_bin_index
 
const char * log_bin_basename
 
bool opt_binlog_order_commits
 
ulong rpl_read_size
 

Macro Definition Documentation

◆ LOG_CLOSE_INDEX

#define LOG_CLOSE_INDEX   1

◆ LOG_CLOSE_STOP_EVENT

#define LOG_CLOSE_STOP_EVENT   4

◆ LOG_CLOSE_TO_BE_OPENED

#define LOG_CLOSE_TO_BE_OPENED   2

◆ LOG_INFO_BACKUP_LOCK

#define LOG_INFO_BACKUP_LOCK   -10

◆ LOG_INFO_EMFILE

#define LOG_INFO_EMFILE   -9

◆ LOG_INFO_EOF

#define LOG_INFO_EOF   -1

◆ LOG_INFO_FATAL

#define LOG_INFO_FATAL   -7

◆ LOG_INFO_IN_USE

#define LOG_INFO_IN_USE   -8

◆ LOG_INFO_INVALID

#define LOG_INFO_INVALID   -3

◆ LOG_INFO_IO

#define LOG_INFO_IO   -2

◆ LOG_INFO_MEM

#define LOG_INFO_MEM   -6

◆ LOG_INFO_NOT_IN_USE

#define LOG_INFO_NOT_IN_USE   -11

◆ LOG_INFO_SEEK

#define LOG_INFO_SEEK   -4

◆ MAX_ALLOWED_FN_EXT_RESET_BIN_LOGS

#define MAX_ALLOWED_FN_EXT_RESET_BIN_LOGS   2000000000

◆ MAX_LOG_UNIQUE_FN_EXT

#define MAX_LOG_UNIQUE_FN_EXT   0x7FFFFFFF

Typedef Documentation

◆ query_id_t

typedef int64 query_id_t

Variable Documentation

◆ mysql_bin_log

MYSQL_PLUGIN_IMPORT MYSQL_BIN_LOG mysql_bin_log
extern