|
int | new_file_without_locking (Format_description_log_event *extra_description_event) |
|
bool | is_current_stmt_binlog_enabled_and_caches_empty (const THD *thd) const |
| Checks whether binlog caches are disabled (binlog does not cache data) or empty in case binloggging is enabled in the current call to this function. More...
|
|
const char * | generate_name (const char *log_name, const char *suffix, char *buff) |
|
bool | is_open () const |
|
std::pair< std::list< std::string >, mysql::utils::Error > | get_filename_list () |
|
| MYSQL_BIN_LOG (uint *sync_period, bool relay_log=false) |
|
| ~MYSQL_BIN_LOG () override |
|
void | set_psi_keys (PSI_mutex_key key_LOCK_index, PSI_mutex_key key_LOCK_commit, PSI_mutex_key key_LOCK_commit_queue, PSI_mutex_key key_LOCK_after_commit, PSI_mutex_key key_LOCK_after_commit_queue, PSI_mutex_key key_LOCK_done, PSI_mutex_key key_LOCK_flush_queue, PSI_mutex_key key_LOCK_log, PSI_mutex_key key_LOCK_binlog_end_pos, PSI_mutex_key key_LOCK_sync, PSI_mutex_key key_LOCK_sync_queue, PSI_mutex_key key_LOCK_xids, PSI_mutex_key key_LOCK_log_info, PSI_mutex_key key_LOCK_wait_for_group_turn, PSI_cond_key key_COND_done, PSI_cond_key key_COND_flush_queue, PSI_cond_key key_update_cond, PSI_cond_key key_prep_xids_cond, PSI_cond_key key_COND_wait_for_group_turn, PSI_file_key key_file_log, PSI_file_key key_file_log_index, PSI_file_key key_file_log_cache, PSI_file_key key_file_log_index_cache) |
|
bool | find_first_log (std::string &binlog_file_name, std::string &errmsg) |
| Find the oldest binary log referenced by the index file. More...
|
|
bool | find_first_log_not_in_gtid_set (char *binlog_file_name, const Gtid_set *gtid_set, Gtid *first_gtid, std::string &errmsg) |
| Find the oldest binary log that contains any GTID that is not in the given gtid set. More...
|
|
bool | init_gtid_sets (Gtid_set *all_gtids, Gtid_set *lost_gtids, bool verify_checksum, bool need_lock, mysql::binlog::event::Transaction_boundary_parser *trx_parser, Gtid_monitoring_info *partial_trx, bool is_server_starting=false) |
| Reads the set of all GTIDs in the binary/relay log, and the set of all lost GTIDs in the binary log, and stores each set in respective argument. More...
|
|
void | set_previous_gtid_set_relaylog (Gtid_set *previous_gtid_set_param) |
|
int | gtid_end_transaction (THD *thd) |
| If the thread owns a GTID, this function generates an empty transaction and releases ownership of the GTID. More...
|
|
bool | reencrypt_logs () |
| Re-encrypt previous existent binary/relay logs as below. More...
|
|
int | open_binlog (const char *opt_name) |
|
void | close () override |
| This is called on shutdown, after ha_panic. More...
|
|
enum_result | commit (THD *thd, bool all) override |
| Commit the transaction in the transaction coordinator. More...
|
|
int | rollback (THD *thd, bool all) override |
| Write a rollback record of the transaction to the binary log. More...
|
|
bool | truncate_relaylog_file (Master_info *mi, my_off_t valid_pos) |
| Truncate the active relay log file in the specified position. More...
|
|
int | prepare (THD *thd, bool all) override |
| Log a prepare record of the transaction to the storage engines. More...
|
|
void | update_thd_next_event_pos (THD *thd) |
|
int | flush_and_set_pending_rows_event (THD *thd, Rows_log_event *event, bool is_transactional) |
|
void | add_bytes_written (ulonglong inc) |
|
void | reset_bytes_written () |
|
void | harvest_bytes_written (Relay_log_info *rli, bool need_log_space_lock) |
| Adds bytes written in the current relay log into the variable handling the total number of bytes acquired by the replica. More...
|
|
void | set_max_size (ulong max_size_arg) |
|
void | update_binlog_end_pos (bool need_lock=true) |
|
void | update_binlog_end_pos (const char *file, my_off_t pos) |
|
int | wait_for_update (const std::chrono::nanoseconds &timeout) |
| Wait until we get a signal that the binary log has been updated. More...
|
|
int | wait_for_update () |
| Wait until we get a signal that the binary log has been updated. More...
|
|
void | init_pthread_objects () |
|
void | cleanup () |
|
bool | open_binlog (const char *log_name, const char *new_name, ulong max_size_arg, bool null_created_arg, bool need_lock_index, bool need_tsid_lock, Format_description_log_event *extra_description_event, uint32 new_index_number=0) |
| Create a new binary log. More...
|
|
bool | open_index_file (const char *index_file_name_arg, const char *log_name, bool need_lock_index) |
|
int | new_file (Format_description_log_event *extra_description_event) |
|
bool | write_event (Log_event *event_info) |
| Write an event to the binary log cache. More...
|
|
bool | write_cache (THD *thd, class binlog_cache_data *cache_data, class Binlog_event_writer *writer) |
| Write the contents of the statement or transaction cache to the binary log. More...
|
|
bool | assign_automatic_gtids_to_flush_group (THD *first_seen) |
| Assign automatic generated GTIDs for all commit group threads in the flush stage having gtid_next.type == AUTOMATIC_GTID. More...
|
|
bool | write_transaction (THD *thd, binlog_cache_data *cache_data, Binlog_event_writer *writer, bool parallelization_barrier) |
| Write the Gtid_log_event to the binary log (prior to writing the statement or transaction cache). More...
|
|
bool | write_stmt_directly (THD *thd, const char *stmt, size_t stmt_len, enum enum_sql_command sql_command) |
| Write a dml into statement cache and then flush it into binlog. More...
|
|
void | report_cache_write_error (THD *thd, bool is_transactional) |
|
bool | check_write_error (const THD *thd) |
|
bool | write_event_to_binlog (Log_event *ev) |
|
bool | write_event_to_binlog_and_sync (Log_event *ev) |
|
void | start_union_events (THD *thd, query_id_t query_id_param) |
|
void | stop_union_events (THD *thd) |
|
bool | is_query_in_union (THD *thd, query_id_t query_id_param) |
|
bool | write_buffer (const char *buf, uint len, Master_info *mi) |
|
bool | write_event (Log_event *ev, Master_info *mi) |
|
int | write_xa_to_cache (THD *thd) |
| Logging XA commit/rollback of a prepared transaction. More...
|
|
bool | write_incident_commit (THD *thd, std::string_view incident_message) |
| Write an incident and call commit. More...
|
|
bool | truncate_update_log_file (const char *log_name, my_off_t valid_pos, my_off_t binlog_size, bool update) |
| Truncte log file and clear LOG_EVENT_BINLOG_IN_USE_F when update is set. More...
|
|
void | make_log_name (char *buf, const char *log_ident) |
| Create a new log file name. More...
|
|
bool | is_active (const char *log_file_name) const |
| Check if we are writing/reading to the given log file. More...
|
|
int | remove_logs_outside_range_from_index (const std::string &first, const std::string &last) |
|
int | rotate (bool force_rotate, bool *check_purge) |
| The method executes rotation when LOCK_log is already acquired by the caller. More...
|
|
void | auto_purge () |
| This function runs automatic purge if the conditions to meet automatic purge are met. More...
|
|
void | auto_purge_at_server_startup () |
| This member function is to be called at server startup. More...
|
|
int | rotate_and_purge (THD *thd, bool force_rotate) |
| Execute a FLUSH LOGS statement. More...
|
|
bool | flush () |
|
bool | flush_and_sync (const bool force=false) |
| Flush binlog cache and synchronize to disk. More...
|
|
int | purge_logs (const char *to_log, bool included, bool need_lock_index, bool need_update_threads, ulonglong *decrease_log_space, bool auto_purge) |
| Remove all logs before the given log from disk and from the index file. More...
|
|
int | purge_logs_before_date (time_t purge_time, bool auto_purge) |
| Remove all logs before the given file date from disk and from the index file. More...
|
|
int | purge_index_entry (THD *thd, ulonglong *decrease_log_space, bool need_lock_index) |
|
bool | reset_logs (THD *thd, bool delete_only=false) |
| Removes files, as part of a RESET BINARY LOGS AND GTIDS or RESET REPLICA statement, by deleting all logs referred to in the index file and the index file. More...
|
|
void | close (uint exiting, bool need_lock_log, bool need_lock_index) |
| Close the log file. More...
|
|
int | find_log_pos (Log_info *linfo, const char *log_name, bool need_lock_index) |
|
int | find_next_log (Log_info *linfo, bool need_lock_index) |
|
int | find_next_relay_log (char log_name[FN_REFLEN+1]) |
|
int | get_current_log (Log_info *linfo, bool need_lock_log=true) |
|
int | raw_get_current_log (Log_info *linfo) |
|
uint | next_file_id () |
|
std::pair< int, std::list< std::string > > | get_log_index (bool need_lock_index=true) |
|
const char * | get_index_fname () |
|
char * | get_log_fname () |
|
const char * | get_name () const |
|
mysql_mutex_t * | get_log_lock () |
|
mysql_mutex_t * | get_commit_lock () |
|
mysql_mutex_t * | get_after_commit_lock () |
|
mysql_cond_t * | get_log_cond () |
|
Binlog_ofile * | get_binlog_file () |
|
mysql_mutex_t * | get_index_lock () |
|
void | lock_index () |
|
void | unlock_index () |
|
IO_CACHE * | get_index_file () |
|
void | report_missing_purged_gtids (const Gtid_set *slave_executed_gtid_set, std::string &errmsg) |
| Function to report the missing GTIDs. More...
|
|
void | report_missing_gtids (const Gtid_set *previous_gtid_set, const Gtid_set *slave_executed_gtid_set, std::string &errmsg) |
| Function to report the missing GTIDs. More...
|
|
my_off_t | get_binlog_end_pos () const |
|
mysql_mutex_t * | get_binlog_end_pos_lock () |
|
void | lock_binlog_end_pos () |
|
void | unlock_binlog_end_pos () |
|
int | get_gtid_executed (Tsid_map *tsid_map, Gtid_set *gtid_set) |
| Deep copy global_tsid_map and gtid_executed. More...
|
|
void | register_log_info (Log_info *log_info) |
| Register Log_info so that log_in_use and adjust_linfo_offsets can operate on all logs. More...
|
|
void | unregister_log_info (Log_info *log_info) |
| Unregister Log_info when it is no longer needed. More...
|
|
int | log_in_use (const char *log_name) |
| Check if any threads use log name. More...
|
|
void | adjust_linfo_offsets (my_off_t purge_offset) |
| Adjust the position pointer in the binary log file for all running replicas. More...
|
|
bool | using_heuristic_recover () |
| Perform heuristic recovery, if –tc-heuristic-recover was used. More...
|
|
| TC_LOG ()=default |
|
virtual | ~TC_LOG ()=default |
|
|
void | inc_prep_xids (THD *thd) |
| Increment the prepared XID counter. More...
|
|
void | dec_prep_xids (THD *thd) |
| Decrement the prepared XID counter. More...
|
|
int32 | get_prep_xids () |
|
uint | get_sync_period () |
|
int | new_file_impl (bool need_lock, Format_description_log_event *extra_description_event) |
| Start writing to a new log file or reopen the old file. More...
|
|
bool | open (PSI_file_key log_file_key, const char *log_name, const char *new_name, uint32 new_index_number) |
| Open the logfile and init IO_CACHE. More...
|
|
bool | init_and_set_log_file_name (const char *log_name, const char *new_name, uint32 new_index_number) |
|
int | generate_new_name (char *new_name, const char *log_name, uint32 new_index_number=0) |
|
bool | read_binlog_in_use_flag (Binlog_file_reader &binlog_file_reader) |
| Read binary log stream header and Format_desc event from binlog_file_reader. More...
|
|
int | open (const char *opt_name) override |
| Initialize and open the coordinator log. More...
|
|
bool | change_stage (THD *thd, Commit_stage_manager::StageID stage, THD *queue, mysql_mutex_t *leave_mutex, mysql_mutex_t *enter_mutex) |
| Enter a stage of the ordered commit procedure. More...
|
|
std::pair< int, my_off_t > | flush_thread_caches (THD *thd) |
| Flush caches for session. More...
|
|
int | flush_cache_to_file (my_off_t *flush_end_pos) |
| Flush the I/O cache to file. More...
|
|
int | finish_commit (THD *thd) |
| Helper function executed when leaving ordered_commit . More...
|
|
std::pair< bool, bool > | sync_binlog_file (bool force) |
| Call fsync() to sync the file to disk. More...
|
|
void | process_commit_stage_queue (THD *thd, THD *queue) |
| Commit a sequence of sessions. More...
|
|
void | process_after_commit_stage_queue (THD *thd, THD *first) |
| Process after commit for a sequence of sessions. More...
|
|
void | init_thd_variables (THD *thd, bool all, bool skip_commit) |
| Set thread variables used while flushing a transaction. More...
|
|
THD * | fetch_and_process_flush_stage_queue (const bool check_and_skip_flush_logs=false) |
| Fetch and empty BINLOG_FLUSH_STAGE and COMMIT_ORDER_FLUSH_STAGE flush queues and flush transactions to the disk, and unblock threads executing slave preserve commit order. More...
|
|
int | process_flush_stage_queue (my_off_t *total_bytes_var, THD **out_queue_var) |
| Execute the flush stage. More...
|
|
int | ordered_commit (THD *thd, bool all, bool skip_commit=false) |
| Flush and commit the transaction. More...
|
|
void | handle_binlog_flush_or_sync_error (THD *thd, bool need_lock_log, const char *message) |
| Helper function to handle flush or sync stage errors. More...
|
|
bool | do_write_cache (Binlog_cache_storage *cache, class Binlog_event_writer *writer) |
| Write the contents of the given IO_CACHE to the binary log. More...
|
|
void | report_binlog_write_error () |
|
bool | after_write_to_relay_log (Master_info *mi) |
| Called after an event has been written to the relay log by the IO thread. More...
|
|