MySQL 9.0.0
Source Code Documentation
|
#include <string.h>
#include <algorithm>
#include "my_dbug.h"
#include "mysql/components/services/log_builtins.h"
#include "mysql/psi/mysql_file.h"
#include "mysqld_error.h"
#include "sql/binlog_index.h"
#include "sql/current_thd.h"
#include "sql/debug_sync.h"
#include "sql/handler.h"
#include "sql/mysqld.h"
#include "sql/sql_class.h"
#include "strmake.h"
Functions | |
static bool | copy_file (IO_CACHE *from, IO_CACHE *to, my_off_t offset, my_off_t end_pos=0) |
Copy content of 'from' file from offset to 'to' file. More... | |
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... | |
int compare_log_name | ( | const char * | log_1, |
const char * | log_2 | ||
) |
Compare log file basenames, i.e.
without their directory names
|
static |
Copy content of 'from' file from offset to 'to' file.
from | File to copy. |
to | File to copy to. |
offset | Offset in 'from' file. |
end_pos | End position in 'from' file up to which content should be copied; 0 means copying till the end of file |
0 | ok |
-1 | error |
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.
err_string | Error string which specifies the exact error message from the caller. |
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.
from | The log name we want to make into an absolute path. |
to | The buffer where to put the results of the normalization. |
is_relay_log | Switch that makes is used inside to choose which option (opt_bin_logname or opt_relay_logname) to use when calculating the base path. |