MySQL 9.0.0
Source Code Documentation
binlog_index.h File Reference
#include <set>
#include "my_inttypes.h"
#include "my_io.h"
#include "my_sys.h"
#include "my_thread_local.h"
#include "mysql/components/services/bits/psi_file_bits.h"
#include "mysql/utils/error.h"

Go to the source code of this file.

Classes

struct  Log_info
 
class  Binlog_index
 Binlog_index defines methods which handle binlog index file and its entries. More...
 
class  Binlog_index_monitor
 Binlog_index_monitor synchronizes access to Binlog_index object. More...
 

Macros

#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
 

Functions

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...
 
int compare_log_name (const char *log_1, const char *log_2)
 Compare log file basenames, i.e. More...
 
void exec_binlog_error_action_abort (const char *err_string)
 When a fatal error occurs due to which binary logging becomes impossible and the user specified binlog_error_action= ABORT_SERVER the following function is invoked. More...
 

Macro Definition Documentation

◆ 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

Function Documentation

◆ compare_log_name()

int compare_log_name ( const char *  log_1,
const char *  log_2 
)

Compare log file basenames, i.e.

without their directory names

Returns
It returns an integer less than, equal to, or greater than zero if log_1 is found, respectively, to be less than, to match, or be greater than log_2

◆ exec_binlog_error_action_abort()

void exec_binlog_error_action_abort ( const char *  err_string)

When a fatal error occurs due to which binary logging becomes impossible and the user specified binlog_error_action= ABORT_SERVER the following function is invoked.

This function pushes the appropriate error message to client and logs the same to server error log and then aborts the server.

Parameters
err_stringError string which specifies the exact error message from the caller.

◆ normalize_binlog_name()

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.

Also trims the cr-lf at the end of the full_path before return to avoid any server startup problem on windows.

Parameters
fromThe log name we want to make into an absolute path.
toThe buffer where to put the results of the normalization.
is_relay_logSwitch that makes is used inside to choose which option (opt_bin_logname or opt_relay_logname) to use when calculating the base path.
Returns
true if a problem occurs, false otherwise.