MySQL 8.0.37
Source Code Documentation
rpl_info_file.cc File Reference
#include "sql/rpl_info_file.h"
#include "my_config.h"
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "my_inttypes.h"
#include "my_loglevel.h"
#include <unistd.h>
#include "m_string.h"
#include "my_dbug.h"
#include "my_dir.h"
#include "my_thread_local.h"
#include "mysql/components/services/log_builtins.h"
#include "mysql/service_mysql_alloc.h"
#include "mysqld_error.h"
#include "sql/dynamic_ids.h"
#include "sql/log.h"
#include "sql/mysqld.h"
#include "sql/psi_memory_key.h"
#include "sql_string.h"

Functions

long init_ulongvar_from_file (ulong *var, IO_CACHE *f, ulong default_val)
 Tries to read an unsigned integer value from the IO_CACHE f current line - being a line a string terminated by '
'. More...
 
long init_strvar_from_file (char *var, size_t max_size, IO_CACHE *f, const char *default_val)
 Tries to read a string of maximum size max_size from the IO_CACHE f current line - being a line a string terminated by '
'. More...
 
long init_intvar_from_file (int *var, IO_CACHE *f, int default_val)
 Tries to read an integer value from the IO_CACHE f current line - being a line a string terminated by '
'. More...
 
long init_floatvar_from_file (float *var, IO_CACHE *f, float default_val)
 Tries to read a float value from the IO_CACHE f current line - being a line a string terminated by '
'. More...
 
long init_dynarray_intvar_from_file (char *buffer, size_t size, char **buffer_act, IO_CACHE *f)
 TODO - Improve this function to use String and avoid this weird computation to calculate the size of the buffers. More...
 
enum_return_check do_check_repository_file (const char *fname)
 

Function Documentation

◆ do_check_repository_file()

enum_return_check do_check_repository_file ( const char *  fname)
inline

◆ init_dynarray_intvar_from_file()

long init_dynarray_intvar_from_file ( char *  buffer,
size_t  size,
char **  buffer_act,
IO_CACHE f 
)

TODO - Improve this function to use String and avoid this weird computation to calculate the size of the buffers.

Particularly, this function is responsible for restoring IGNORE_SERVER_IDS list of servers whose events the slave is going to ignore (to not log them in the relay log).

Items being read are supposed to be decimal output of values of a type shorter or equal of long and separated by the single space.

Parameters
bufferPut the read values in this static buffer
sizeSize of the static buffer
buffer_actPoints to the final buffer as dynamic buffer may be used if the static buffer is not big enough.
fIO_CACHE of the replication info file.
Return values
>=0 Number or read bytes
<0 An error

◆ init_floatvar_from_file()

long init_floatvar_from_file ( float *  var,
IO_CACHE f,
float  default_val 
)

Tries to read a float value from the IO_CACHE f current line - being a line a string terminated by '
'.

Parameters
varPut the read value in this parameter.
fIO_CACHE of the replication info file.
default_valDefault value to be assigned in case unable to read bytes.
Return values
>=0 Number or read bytes
<0 An error

◆ init_intvar_from_file()

long init_intvar_from_file ( int *  var,
IO_CACHE f,
int  default_val 
)

Tries to read an integer value from the IO_CACHE f current line - being a line a string terminated by '
'.

Parameters
varPut the read value in this parameter.
fIO_CACHE of the replication info file.
default_valDefault value to be assigned in case unable to read bytes.
Return values
>=0 Number or read bytes
<0 An error

◆ init_strvar_from_file()

long init_strvar_from_file ( char *  var,
size_t  max_size,
IO_CACHE f,
const char *  default_val 
)

Tries to read a string of maximum size max_size from the IO_CACHE f current line - being a line a string terminated by '
'.

Parameters
varPut the read values in this static buffer
max_sizeSize of the static buffer
fIO_CACHE of the replication info file.
default_valDefault value to be assigned in case unable to read bytes.
Return values
>=0 Number or read bytes
<0 An error

◆ init_ulongvar_from_file()

long init_ulongvar_from_file ( ulong *  var,
IO_CACHE f,
ulong  default_val 
)

Tries to read an unsigned integer value from the IO_CACHE f current line - being a line a string terminated by '
'.

Parameters
varPut the read value in this parameter.
fIO_CACHE of the replication info file.
default_valDefault value to be assigned in case unable to read bytes.
Return values
>=0 Number or read bytes
<0 An error