MySQL 8.0.31
Source Code Documentation
meb Namespace Reference

Classes

class  Block
 Encapsulates a log block of size QUEUE_BLOCK_SIZE, enqueued by the producer, dequeued by the consumer and written into the redo log archive file. More...
 
class  Dynamic_procedures
 This component's UDFs.mysql. More...
 
class  Guardian
 
class  Queue
 This template class implements a queue that,. More...
 

Functions

int validate_redo_log_archive_dirs (THD *thd, SYS_VAR *var, void *save, st_mysql_value *value)
 Check whether a valid value is given to innodb_redo_log_archive_dirs. More...
 
void redo_log_archive_init ()
 Initialize redo log archiving. More...
 
void redo_log_archive_deinit ()
 De-initialize redo log archiving. More...
 
void redo_log_archive_session_end (innodb_session_t *session)
 Security function to be called when the current session ends. More...
 
void redo_log_archive_produce (const byte *write_buf, const size_t write_size)
 The producer produces full QUEUE_BLOCK_SIZE redo log blocks. More...
 
bool redo_log_archive_is_active ()
 
bool register_privilege (const char *priv_name)
 Register a privilege. More...
 
static void redo_log_archive_consumer ()
 Dequeue blocks of size QUEUE_BLOCK_SIZE, enqueued by the producer. More...
 
static bool terminate_consumer (bool rapid)
 
static bool consumer_is_running ()
 
static bool consumer_not_running ()
 
static bool consumer_not_flushed ()
 
static bool timeout (bool(*wait_condition)())
 Timeout function. More...
 
bool innodb_redo_log_archive_start_init (UDF_INIT *initid, UDF_ARGS *args, char *message)
 Initialize UDF innodb_redo_log_archive_start. More...
 
void innodb_redo_log_archive_start_deinit (UDF_INIT *initid)
 Deinitialize UDF innodb_redo_log_archive_start. More...
 
long long innodb_redo_log_archive_start (UDF_INIT *initid, UDF_ARGS *args, unsigned char *null_value, unsigned char *error)
 UDF innodb_redo_log_archive_start. More...
 
bool innodb_redo_log_archive_stop_init (UDF_INIT *initid, UDF_ARGS *args, char *message)
 Initialize UDF innodb_redo_log_archive_stop. More...
 
void innodb_redo_log_archive_stop_deinit (UDF_INIT *initid)
 Deinitialize UDF innodb_redo_log_archive_stop. More...
 
long long innodb_redo_log_archive_stop (UDF_INIT *initid, UDF_ARGS *args, unsigned char *null_value, unsigned char *error)
 UDF innodb_redo_log_archive_stop. More...
 
bool innodb_redo_log_archive_flush_init (UDF_INIT *initid, UDF_ARGS *args, char *message)
 Initialize UDF innodb_redo_log_archive_flush. More...
 
void innodb_redo_log_archive_flush_deinit (UDF_INIT *initid)
 Deinitialize UDF innodb_redo_log_archive_flush. More...
 
long long innodb_redo_log_archive_flush (UDF_INIT *initid, UDF_ARGS *args, unsigned char *null_value, unsigned char *error)
 UDF innodb_redo_log_archive_flush. More...
 
bool innodb_redo_log_sharp_checkpoint_init (UDF_INIT *initid, UDF_ARGS *args, char *message)
 Initialize UDF innodb_redo_log_sharp_checkpoint. More...
 
void innodb_redo_log_sharp_checkpoint_deinit (UDF_INIT *initid)
 
long long innodb_redo_log_sharp_checkpoint ( UDF_INIT *initid, UDF_ARGS *args, unsigned char *null_value, unsigned char *error)
 UDF innodb_redo_log_sharp_checkpoint. More...
 
bool innodb_redo_log_consumer_register_init (UDF_INIT *initid, UDF_ARGS *args, char *message)
 Initialize UDF innodb_redo_log_consumer_register. More...
 
void innodb_redo_log_consumer_register_deinit ([[maybe_unused]] UDF_INIT *initid)
 Deinitialize UDF innodb_redo_log_consumer_register. More...
 
long long innodb_redo_log_consumer_register ( UDF_INIT *initid, UDF_ARGS *args, unsigned char *null_value, unsigned char *error)
 UDF innodb_redo_log_consumer_register. More...
 
bool innodb_redo_log_consumer_unregister_init (UDF_INIT *initid, UDF_ARGS *args, char *message)
 Initialize UDF innodb_redo_log_consumer_unregister. More...
 
void innodb_redo_log_consumer_unregister_deinit ([[maybe_unused]] UDF_INIT *initid)
 Deinitialize UDF innodb_redo_log_consumer_unregister. More...
 
long long innodb_redo_log_consumer_unregister ( UDF_INIT *initid, UDF_ARGS *args, unsigned char *null_value, unsigned char *error)
 UDF innodb_redo_log_consumer_unregister. More...
 
bool innodb_redo_log_consumer_advance_init (UDF_INIT *initid, UDF_ARGS *args, char *message)
 Initialize UDF innodb_redo_log_consumer_advance. More...
 
void innodb_redo_log_consumer_advance_deinit (UDF_INIT *initid)
 
long long innodb_redo_log_consumer_advance ( UDF_INIT *initid, UDF_ARGS *args, unsigned char *null_value, unsigned char *error)
 UDF innodb_redo_log_consumer_advance. More...
 
static bool drop_remnants (bool force)
 Drop potential left-over resources to avoid leaks. More...
 
static bool verify_privilege (THD *thd, const char *priv_name)
 Verify that thd has a certain privilege. More...
 
static bool get_labeled_directory (const char *label, std::string *dir)
 Get the directory behind the label in a semi-colon separated list of labeled directories. More...
 
static bool verify_no_world_permissions (const Fil_path &path)
 Verify that a file system object does not grant permissions to everyone. More...
 
static std::string trim_path_name (const std::string &path_name)
 Trim trailing directory delimiters from a path name. More...
 
static std::string delimit_dir_name (const std::string &path_name)
 Append a trailing directory delimiter to a path name. More...
 
static void append_path (const char *variable_name, const char *path_name, std::vector< std::string > *variables, std::vector< Fil_path > *directories)
 Append a path to a vector of directory paths. More...
 
static bool verify_no_server_directory (const Fil_path &path)
 Verify that a path name is not in, under, or above a server directory. More...
 
static void construct_file_pathname (const Fil_path &path, std::string *file_pathname)
 Construct the file path name as directory/archive.serverUUID.000001.log. More...
 
static bool construct_secure_file_path_name (const char *label, const char *subdir, std::string *file_pathname)
 Execute security checks and construct a file path name. More...
 
static bool redo_log_archive_start (THD *thd, const char *label, const char *subdir)
 
static bool redo_log_archive_stop (THD *thd)
 
static bool redo_log_archive_flush (THD *thd)
 
static bool redo_log_consumer_register (innodb_session_t *session)
 
static bool redo_log_consumer_unregister (innodb_session_t *session)
 
static bool redo_log_consumer_advance (innodb_session_t *session, lsn_t lsn)
 
static void handle_write_error (uint64_t file_offset)
 Handle a write error. More...
 
void innodb_redo_log_sharp_checkpoint_deinit ([[maybe_unused]] UDF_INIT *initid)
 Deinitialize UDF innodb_redo_log_sharp_checkpoint. More...
 
void innodb_redo_log_consumer_advance_deinit ([[maybe_unused]] UDF_INIT *initid)
 Deinitialize UDF innodb_redo_log_consumer_advance. More...
 

Variables

mysql_pfs_key_t redo_log_archive_consumer_thread_key
 Performance schema key for the log consumer thread. More...
 
mysql_pfs_key_t redo_log_archive_file_key
 Performance schema key for the redo log archive file. More...
 
char * redo_log_archive_dirs {}
 
constexpr const char * innodb_redo_log_archive_privilege
 
constexpr const char * backup_admin_privilege {"BACKUP_ADMIN"}
 
constexpr const char * logmsgpfx {"innodb_redo_log_archive: "}
 
constexpr size_t QUEUE_BLOCK_SIZE = 4096
 
constexpr size_t QUEUE_SIZE_MAX = 16384
 
static std::atomic< bool > redo_log_archive_initialized {}
 
static ib_mutex_t redo_log_archive_admin_mutex
 Mutex to synchronize start and stop of the redo log archiving. More...
 
static bool redo_log_archive_active {false}
 Boolean indicating whether the redo log archiving is active. More...
 
static innodb_session_tredo_log_archive_session {}
 Session. More...
 
static THDredo_log_archive_thd {}
 
static bool redo_log_archive_session_ending {false}
 
static std::string redo_log_archive_recorded_error {}
 Error message recorded during redo log archiving. More...
 
static std::string redo_log_archive_file_pathname {}
 String containing the redo log archive filename. More...
 
static pfs_os_file_t redo_log_archive_file_handle {}
 The file handle to the redo log archive file. More...
 
static bool redo_log_archive_consume_running {false}
 Whether the consumer thread is running. More...
 
static bool redo_log_archive_consume_complete {true}
 Whether the consumer has completed. More...
 
static os_event_t redo_log_archive_consume_event {}
 Event to inform that the consumer has exited after purging all the queue elements or that it got a flush block. More...
 
static bool redo_log_archive_consume_flushed {false}
 Whether the consumer has copied a flush block. More...
 
static bool redo_log_archive_produce_blocks {false}
 Boolean indicating whether to produce queue blocks. More...
 
static Block redo_log_archive_tmp_block {}
 Temporary block used to build complete redo log blocks of size QUEUE_BLOCK_SIZE by the producer. More...
 
static Queue< Blockredo_log_archive_queue {}
 Queue into which the producer enqueues redo log blocks of size QUEUE_BLOCK_SIZE, and from which the consumer reads redo log blocks of size QUEUE_BLOCK_SIZE. More...
 
Dynamic_procedures s_dynamic_procedures
 
static std::unique_ptr< Log_user_consumerlog_meb_consumer
 
static innodb_session_tlog_meb_consumer_session
 

Function Documentation

◆ append_path()

static void meb::append_path ( const char *  variable_name,
const char *  path_name,
std::vector< std::string > *  variables,
std::vector< Fil_path > *  directories 
)
static

Append a path to a vector of directory paths.

Append a variable name to a vector of variable names. The variable names belong to the server variables, from which the directory paths have been taken. The matching pair shares the same vector index. Only non-NULL, non-empty path names and their corresponding variable names are appended. The appended paths are normalized absolute real path names.

Parameters
[in]variable_namevariable name from which the path comes
[in]path_namepath name, may be NULL or empty
[out]variablesvector of variable names
[out]directoriesvector of directory paths

◆ construct_file_pathname()

static void meb::construct_file_pathname ( const Fil_path path,
std::string *  file_pathname 
)
static

Construct the file path name as directory/archive.serverUUID.000001.log.

Parameters
[in]pathnormalized absolute real path name
[out]file_pathnamefile path name

◆ construct_secure_file_path_name()

static bool meb::construct_secure_file_path_name ( const char *  label,
const char *  subdir,
std::string *  file_pathname 
)
static

Execute security checks and construct a file path name.

Parameters
[in]labela label from innodb_redo_log_archive_dirs
[in]subdira plain directory name, on Unix/Linux/Mac no slash ('/') is allowed, on Windows no slash ('/'), backslash ('\'), nor colon (':') is allowed in the argument. Can be NULL or empty
[out]file_pathnamethe secure file path name
Returns
status
Return values
falsesuccess
truefailure

◆ consumer_is_running()

static bool meb::consumer_is_running ( )
static

◆ consumer_not_flushed()

static bool meb::consumer_not_flushed ( )
static

◆ consumer_not_running()

static bool meb::consumer_not_running ( )
static

◆ delimit_dir_name()

static std::string meb::delimit_dir_name ( const std::string &  path_name)
static

Append a trailing directory delimiter to a path name.

This is done to support regression tests, which may want to replace path names based on server variable values, that could contain a trailing directory delimiter.

Parameters
[in]path_namepath name
Returns
trimmed path name

◆ drop_remnants()

static bool meb::drop_remnants ( bool  force)
static

Drop potential left-over resources to avoid leaks.

NOTE: This function must be called under the redo_log_archive_admin_mutex!

Parameters
[in]forcewhether to drop resources even if consumer cannot be stopped
Returns
status
Return values
falsesuccess
truefailure

◆ get_labeled_directory()

static bool meb::get_labeled_directory ( const char *  label,
std::string *  dir 
)
static

Get the directory behind the label in a semi-colon separated list of labeled directories.

Parameters
[in]labellabel for the selected directory; can be empty
[out]dirdirectory path name
Returns
status
Return values
falsesuccess
truefailure

◆ handle_write_error()

static void meb::handle_write_error ( uint64_t  file_offset)
static

Handle a write error.

Record an error message. Stop redo log archiving.

Parameters
[in]file_offsetwrite offset

◆ innodb_redo_log_archive_flush()

long long meb::innodb_redo_log_archive_flush ( UDF_INIT initid,
UDF_ARGS args,
unsigned char *  null_value,
unsigned char *  error 
)

UDF innodb_redo_log_archive_flush.

The UDF is of type Udf_func_longlong returning INT_RESULT

See include/mysql/udf_registration_types.h

The UDF expects one argument:

  • A thread context pointer, maybe NULL

Returns zero on success, one otherwise.

◆ innodb_redo_log_archive_flush_deinit()

void meb::innodb_redo_log_archive_flush_deinit ( UDF_INIT initid)

Deinitialize UDF innodb_redo_log_archive_flush.

See include/mysql/udf_registration_types.h

◆ innodb_redo_log_archive_flush_init()

bool meb::innodb_redo_log_archive_flush_init ( UDF_INIT initid,
UDF_ARGS args,
char *  message 
)

Initialize UDF innodb_redo_log_archive_flush.

See include/mysql/udf_registration_types.h

◆ innodb_redo_log_archive_start()

long long meb::innodb_redo_log_archive_start ( UDF_INIT initid,
UDF_ARGS args,
unsigned char *  null_value,
unsigned char *  error 
)

UDF innodb_redo_log_archive_start.

The UDF is of type Udf_func_longlong returning INT_RESULT

See include/mysql/udf_registration_types.h

The UDF expects two or three arguments:

  • A thread context pointer, maybe NULL
  • A label from the server system variable innodb_redo_log_archive_dirs
  • An optional subdirectory inside the corresponding directory path from innodb_redo_log_archive_dirs. This must be a plain directory name. On Unix/Linux/Mac no slash ('/') is allowed in the argument. On Windows, no slash ('/'), backslash ('\'), nor colon (':') is allowed in the argument. Can be NULL or empty.

Returns zero on success, one otherwise.

◆ innodb_redo_log_archive_start_deinit()

void meb::innodb_redo_log_archive_start_deinit ( UDF_INIT initid)

Deinitialize UDF innodb_redo_log_archive_start.

See include/mysql/udf_registration_types.h

◆ innodb_redo_log_archive_start_init()

bool meb::innodb_redo_log_archive_start_init ( UDF_INIT initid,
UDF_ARGS args,
char *  message 
)

Initialize UDF innodb_redo_log_archive_start.

See include/mysql/udf_registration_types.h

◆ innodb_redo_log_archive_stop()

long long meb::innodb_redo_log_archive_stop ( UDF_INIT initid,
UDF_ARGS args,
unsigned char *  null_value,
unsigned char *  error 
)

UDF innodb_redo_log_archive_stop.

The UDF is of type Udf_func_longlong returning INT_RESULT

See include/mysql/udf_registration_types.h

The UDF expects one argument:

  • A thread context pointer, maybe NULL

Returns zero on success, one otherwise.

◆ innodb_redo_log_archive_stop_deinit()

void meb::innodb_redo_log_archive_stop_deinit ( UDF_INIT initid)

Deinitialize UDF innodb_redo_log_archive_stop.

See include/mysql/udf_registration_types.h

◆ innodb_redo_log_archive_stop_init()

bool meb::innodb_redo_log_archive_stop_init ( UDF_INIT initid,
UDF_ARGS args,
char *  message 
)

Initialize UDF innodb_redo_log_archive_stop.

See include/mysql/udf_registration_types.h

◆ innodb_redo_log_consumer_advance()

long long meb::innodb_redo_log_consumer_advance ( UDF_INIT initid,
UDF_ARGS args,
unsigned char *  null_value,
unsigned char *  error 
)

UDF innodb_redo_log_consumer_advance.

The UDF is of type Udf_func_longlong returning INT_RESULT and expects LSN argument which is the LSN up to which all redo log data has been consumed by the registered consumer.

Before calling this function the consumer must be registered by the innodb_redo_log_consumer_register UDF.

See include/mysql/udf_registration_types.h

Returns zero on success, one otherwise.

◆ innodb_redo_log_consumer_advance_deinit() [1/2]

void meb::innodb_redo_log_consumer_advance_deinit ( [ [maybe_unused] ] UDF_INIT initid)

Deinitialize UDF innodb_redo_log_consumer_advance.

See include/mysql/udf_registration_types.h

◆ innodb_redo_log_consumer_advance_deinit() [2/2]

void meb::innodb_redo_log_consumer_advance_deinit ( UDF_INIT initid)

◆ innodb_redo_log_consumer_advance_init()

bool meb::innodb_redo_log_consumer_advance_init ( UDF_INIT initid,
UDF_ARGS args,
char *  message 
)

Initialize UDF innodb_redo_log_consumer_advance.

See include/mysql/udf_registration_types.h

◆ innodb_redo_log_consumer_register()

long long meb::innodb_redo_log_consumer_register ( UDF_INIT initid,
UDF_ARGS args,
unsigned char *  null_value,
unsigned char *  error 
)

UDF innodb_redo_log_consumer_register.

The UDF is of type Udf_func_longlong returning INT_RESULT and expects no arguments.

See include/mysql/udf_registration_types.h

Returns zero on success, one otherwise.

◆ innodb_redo_log_consumer_register_deinit()

void meb::innodb_redo_log_consumer_register_deinit ( [[maybe_unused] ] UDF_INIT initid)

Deinitialize UDF innodb_redo_log_consumer_register.

See include/mysql/udf_registration_types.h

◆ innodb_redo_log_consumer_register_init()

bool meb::innodb_redo_log_consumer_register_init ( UDF_INIT initid,
UDF_ARGS args,
char *  message 
)

Initialize UDF innodb_redo_log_consumer_register.

See include/mysql/udf_registration_types.h

◆ innodb_redo_log_consumer_unregister()

long long meb::innodb_redo_log_consumer_unregister ( UDF_INIT initid,
UDF_ARGS args,
unsigned char *  null_value,
unsigned char *  error 
)

UDF innodb_redo_log_consumer_unregister.

The UDF is of type Udf_func_longlong returning INT_RESULT and expects no arguments.

See include/mysql/udf_registration_types.h

Returns zero on success, one otherwise.

◆ innodb_redo_log_consumer_unregister_deinit()

void meb::innodb_redo_log_consumer_unregister_deinit ( [[maybe_unused] ] UDF_INIT initid)

Deinitialize UDF innodb_redo_log_consumer_unregister.

See include/mysql/udf_registration_types.h

◆ innodb_redo_log_consumer_unregister_init()

bool meb::innodb_redo_log_consumer_unregister_init ( UDF_INIT initid,
UDF_ARGS args,
char *  message 
)

Initialize UDF innodb_redo_log_consumer_unregister.

See include/mysql/udf_registration_types.h

◆ innodb_redo_log_sharp_checkpoint()

long long meb::innodb_redo_log_sharp_checkpoint ( UDF_INIT initid,
UDF_ARGS args,
unsigned char *  null_value,
unsigned char *  error 
)

UDF innodb_redo_log_sharp_checkpoint.

The UDF is of type Udf_func_longlong returning INT_RESULT

See include/mysql/udf_registration_types.h

The UDF expects one argument:

  • A thread context pointer, maybe NULL

Returns zero on success, one otherwise.

◆ innodb_redo_log_sharp_checkpoint_deinit() [1/2]

void meb::innodb_redo_log_sharp_checkpoint_deinit ( [ [maybe_unused] ] UDF_INIT initid)

Deinitialize UDF innodb_redo_log_sharp_checkpoint.

See include/mysql/udf_registration_types.h

◆ innodb_redo_log_sharp_checkpoint_deinit() [2/2]

void meb::innodb_redo_log_sharp_checkpoint_deinit ( UDF_INIT initid)

◆ innodb_redo_log_sharp_checkpoint_init()

bool meb::innodb_redo_log_sharp_checkpoint_init ( UDF_INIT initid,
UDF_ARGS args,
char *  message 
)

Initialize UDF innodb_redo_log_sharp_checkpoint.

See include/mysql/udf_registration_types.h

◆ redo_log_archive_consumer()

static void meb::redo_log_archive_consumer ( )
static

Dequeue blocks of size QUEUE_BLOCK_SIZE, enqueued by the producer.

Write the blocks to the redo log archive file sequentially.

◆ redo_log_archive_deinit()

void meb::redo_log_archive_deinit ( )

De-initialize redo log archiving.

To be called when the InnoDB handlerton is de-initialized.

◆ redo_log_archive_flush()

static bool meb::redo_log_archive_flush ( THD thd)
static

◆ redo_log_archive_init()

void meb::redo_log_archive_init ( )

Initialize redo log archiving.

To be called when the InnoDB handlerton is initialized.

◆ redo_log_archive_is_active()

bool meb::redo_log_archive_is_active ( )
Returns
true iff redo log archiving is active.

◆ redo_log_archive_produce()

void meb::redo_log_archive_produce ( const byte write_buf,
const size_t  write_size 
)

The producer produces full QUEUE_BLOCK_SIZE redo log blocks.

Produce redo log blocks for the queue.

These log blocks are enqueued, and are later fetched by the consumer thread.

This function does nothing, if redo log archiving is not active.

In order to produce full QUEUE_BLOCK_SIZE redo log blocks, the producer scans each OS_FILE_LOG_BLOCK_SIZE log block (written by the server) to check if they are,

  1. empty
  2. incomplete

The producer skips empty and incomplete log blocks, unless they belong to the last flush, when the contents of its buffer are completely enqueued for flushing.

Parameters
[in]write_bufThe write buffer that is being written to the redo log archive file.
[in]write_sizeThe size of the data being written.

This function is called for every log write. So it must be as efficient as possible.

NOTE: This function must be called under the 'log_sys.writer_mutex'!

◆ redo_log_archive_session_end()

void meb::redo_log_archive_session_end ( innodb_session_t session)

Security function to be called when the current session ends.

This function invokes the stop implementation if this session has started the redo log archiving. It is a safe-guard against an infinitely active redo log archiving if the client goes away without deactivating the logging explicitly.

Parameters
[in]sessionthe current ending session

◆ redo_log_archive_start()

static bool meb::redo_log_archive_start ( THD thd,
const char *  label,
const char *  subdir 
)
static

◆ redo_log_archive_stop()

static bool meb::redo_log_archive_stop ( THD thd)
static

◆ redo_log_consumer_advance()

static bool meb::redo_log_consumer_advance ( innodb_session_t session,
lsn_t  lsn 
)
static

◆ redo_log_consumer_register()

static bool meb::redo_log_consumer_register ( innodb_session_t session)
static

◆ redo_log_consumer_unregister()

static bool meb::redo_log_consumer_unregister ( innodb_session_t session)
static

◆ register_privilege()

bool meb::register_privilege ( const char *  priv_name)

Register a privilege.

We should move this function and other UDF registration functions to some common utility file later.

Parameters
[in]priv_nameprivilege name
Returns
status
Return values
falsesuccess
truefailure

◆ terminate_consumer()

static bool meb::terminate_consumer ( bool  rapid)
static

◆ timeout()

static bool meb::timeout ( bool(*)()  wait_condition)
static

Timeout function.

Checks one of the conditions above.

Parameters
[in]wait_conditionfunction to return true for continued waiting
Returns
whether the wait timed out
Note
This function must be called under the redo_log_archive_admin_mutex!

◆ trim_path_name()

static std::string meb::trim_path_name ( const std::string &  path_name)
static

Trim trailing directory delimiters from a path name.

Parameters
[in]path_namepath name
Returns
trimmed path name

◆ validate_redo_log_archive_dirs()

int meb::validate_redo_log_archive_dirs ( THD thd,
SYS_VAR var,
void *  save,
st_mysql_value value 
)

Check whether a valid value is given to innodb_redo_log_archive_dirs.

This function is registered as a callback with MySQL.

Parameters
[in]thdthread handle
[in]varpointer to system variable
[out]saveimmediate result for update function
[in]valueincoming string
Returns
0 for valid contents

◆ verify_no_server_directory()

static bool meb::verify_no_server_directory ( const Fil_path path)
static

Verify that a path name is not in, under, or above a server directory.

Parameters
[in]pathnormalized absolute real path name
Returns
status
Return values
falsesuccess
truefailure

◆ verify_no_world_permissions()

static bool meb::verify_no_world_permissions ( const Fil_path path)
static

Verify that a file system object does not grant permissions to everyone.

Parameters
[in]pathpath name of the file system object
Returns
status
Return values
falsesuccess
truefailure

◆ verify_privilege()

static bool meb::verify_privilege ( THD thd,
const char *  priv_name 
)
static

Verify that thd has a certain privilege.

Parameters
[in,out]thdcurrent THD instance, current session
[in]priv_namename of the required privilege
Returns
status
Return values
falseprivilege is granted
trueprivilege is denied

Variable Documentation

◆ backup_admin_privilege

constexpr const char* meb::backup_admin_privilege {"BACKUP_ADMIN"}
constexpr

◆ innodb_redo_log_archive_privilege

constexpr const char* meb::innodb_redo_log_archive_privilege
constexpr
Initial value:
{
"INNODB_REDO_LOG_ARCHIVE"}

◆ log_meb_consumer

std::unique_ptr<Log_user_consumer> meb::log_meb_consumer
static

◆ log_meb_consumer_session

innodb_session_t* meb::log_meb_consumer_session
static

◆ logmsgpfx

constexpr const char* meb::logmsgpfx {"innodb_redo_log_archive: "}
constexpr

◆ QUEUE_BLOCK_SIZE

constexpr size_t meb::QUEUE_BLOCK_SIZE = 4096
constexpr

◆ QUEUE_SIZE_MAX

constexpr size_t meb::QUEUE_SIZE_MAX = 16384
constexpr

◆ redo_log_archive_active

bool meb::redo_log_archive_active {false}
static

Boolean indicating whether the redo log archiving is active.

◆ redo_log_archive_admin_mutex

ib_mutex_t meb::redo_log_archive_admin_mutex
static

Mutex to synchronize start and stop of the redo log archiving.

◆ redo_log_archive_consume_complete

bool meb::redo_log_archive_consume_complete {true}
static

Whether the consumer has completed.

◆ redo_log_archive_consume_event

os_event_t meb::redo_log_archive_consume_event {}
static

Event to inform that the consumer has exited after purging all the queue elements or that it got a flush block.

◆ redo_log_archive_consume_flushed

bool meb::redo_log_archive_consume_flushed {false}
static

Whether the consumer has copied a flush block.

◆ redo_log_archive_consume_running

bool meb::redo_log_archive_consume_running {false}
static

Whether the consumer thread is running.

◆ redo_log_archive_consumer_thread_key

mysql_pfs_key_t meb::redo_log_archive_consumer_thread_key
extern

Performance schema key for the log consumer thread.

◆ redo_log_archive_dirs

char * meb::redo_log_archive_dirs {}

◆ redo_log_archive_file_handle

pfs_os_file_t meb::redo_log_archive_file_handle {}
static

The file handle to the redo log archive file.

◆ redo_log_archive_file_key

mysql_pfs_key_t meb::redo_log_archive_file_key
extern

Performance schema key for the redo log archive file.

◆ redo_log_archive_file_pathname

std::string meb::redo_log_archive_file_pathname {}
static

String containing the redo log archive filename.

◆ redo_log_archive_initialized

std::atomic<bool> meb::redo_log_archive_initialized {}
static

◆ redo_log_archive_produce_blocks

bool meb::redo_log_archive_produce_blocks {false}
static

Boolean indicating whether to produce queue blocks.

WARNING: To avoid races, this variable must be read/written under the 'log_sys.writer_mutex' only.

◆ redo_log_archive_queue

Queue<Block> meb::redo_log_archive_queue {}
static

Queue into which the producer enqueues redo log blocks of size QUEUE_BLOCK_SIZE, and from which the consumer reads redo log blocks of size QUEUE_BLOCK_SIZE.

◆ redo_log_archive_recorded_error

std::string meb::redo_log_archive_recorded_error {}
static

Error message recorded during redo log archiving.

◆ redo_log_archive_session

innodb_session_t* meb::redo_log_archive_session {}
static

Session.

◆ redo_log_archive_session_ending

bool meb::redo_log_archive_session_ending {false}
static

◆ redo_log_archive_thd

THD* meb::redo_log_archive_thd {}
static

◆ redo_log_archive_tmp_block

Block meb::redo_log_archive_tmp_block {}
static

Temporary block used to build complete redo log blocks of size QUEUE_BLOCK_SIZE by the producer.

WARNING: To avoid races, this variable must be read/written under the 'log_sys.writer_mutex' only.

◆ s_dynamic_procedures

Dynamic_procedures meb::s_dynamic_procedures