23#ifndef RPL_GTID_PERSIST_H_
24#define RPL_GTID_PERSIST_H_
34#include "mysqld_error.h"
Represents a set of GTIDs.
Definition: rpl_gtid.h:1454
Definition: rpl_gtid_persist.h:45
void before_open(THD *thd) override
Prepares before opening table.
Definition: rpl_gtid_persist.cc:124
bool deinit(THD *thd, TABLE *table, bool error, bool need_commit)
De-initialize the gtid_executed table access context as following:
Definition: rpl_gtid_persist.cc:172
Gtid_table_access_context & operator=(const Gtid_table_access_context &info)
bool m_is_write
Definition: rpl_gtid_persist.h:103
static const LEX_CSTRING DB_NAME
Definition: rpl_gtid_persist.h:47
THD * m_drop_thd_object
Definition: rpl_gtid_persist.h:101
static const LEX_CSTRING TABLE_NAME
Definition: rpl_gtid_persist.h:48
Gtid_table_access_context()
Definition: rpl_gtid_persist.h:50
ulonglong m_tmp_disable_binlog__save_options
Definition: rpl_gtid_persist.h:107
~Gtid_table_access_context() override=default
bool init(THD **thd, TABLE **table, bool is_write)
Initialize the gtid_executed table access context as following:
Definition: rpl_gtid_persist.cc:135
void drop_thd(THD *thd)
Definition: rpl_gtid_persist.cc:119
THD * create_thd()
Creates a new thread in the bootstrap process or in the mysqld startup, a thread is created in order ...
Definition: rpl_gtid_persist.cc:106
Gtid_table_access_context(const Gtid_table_access_context &info)
Open_tables_backup m_backup
Definition: rpl_gtid_persist.h:105
bool m_skip_readonly_set
Definition: rpl_gtid_persist.h:110
Definition: rpl_gtid_persist.h:118
std::atomic< int64 > m_atomic_count
Definition: rpl_gtid_persist.h:238
int save(THD *thd, const Gtid *gtid)
Insert the gtid into table.
Definition: rpl_gtid_persist.cc:339
int warn_or_err_on_explicit_modification(THD *thd, Table_ref *table)
Push a warning to client if user is modifying the gtid_executed table explicitly by a non-XA transact...
Definition: rpl_gtid_persist.h:207
Gtid_table_persistor & operator=(const Gtid_table_persistor &info)
static const uint number_fields
Definition: rpl_gtid_persist.h:120
int compress(THD *thd)
Compress the gtid_executed table completely by employing one or more transactions.
Definition: rpl_gtid_persist.cc:480
std::string encode_gtid_text(TABLE *table)
Encode the current row fetched from the table into gtid text.
Definition: rpl_gtid_persist.cc:625
int fill_fields(Field **fields, const char *sid, rpl_gno gno_start, rpl_gno gno_end)
Fill a gtid interval into fields of the gtid_executed table.
Definition: rpl_gtid_persist.cc:208
int reset(THD *thd)
Delete all rows from the table.
Definition: rpl_gtid_persist.cc:601
int delete_all(TABLE *table)
Delete all rows in the gtid_executed table.
Definition: rpl_gtid_persist.cc:703
int update_row(TABLE *table, const char *sid, rpl_gno gno_start, rpl_gno new_gno_end)
Update a gtid interval in the gtid_executed table.
Definition: rpl_gtid_persist.cc:270
Gtid_table_persistor(const Gtid_table_persistor &info)
Gtid_table_persistor()=default
int compress_in_single_transaction(THD *thd, bool &is_complete)
Compress the gtid_executed table, read each row by the PK(sid, gno_start) in increasing order,...
Definition: rpl_gtid_persist.cc:499
virtual ~Gtid_table_persistor()=default
int compress_first_consecutive_range(TABLE *table, bool &is_complete)
Read each row by the PK(sid, gno_start) in increasing order, compress the first consecutive range of ...
Definition: rpl_gtid_persist.cc:531
void get_gtid_interval(TABLE *table, std::string &sid, rpl_gno &gno_start, rpl_gno &gno_end)
Get gtid interval from the the current row of the table.
Definition: rpl_gtid_persist.cc:643
int fetch_gtids(Gtid_set *gtid_set)
Fetch gtids from gtid_executed table and store them into gtid_executed set.
Definition: rpl_gtid_persist.cc:657
int write_row(TABLE *table, const char *sid, rpl_gno gno_start, rpl_gno gno_end)
Write a gtid interval into the gtid_executed table.
Definition: rpl_gtid_persist.cc:238
Storage for backup of Open_tables_state.
Definition: sql_class.h:687
A base class for accessing a system table.
Definition: rpl_table_access.h:39
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
void raise_error_printf(uint code,...)
Raise an exception condition, with a formatted message.
Definition: sql_class.cc:922
bool is_operating_gtid_table_implicitly
Definition: sql_class.h:2265
void raise_warning_printf(uint code,...)
Raise a completion condition (warning), with a formatted message.
Definition: sql_class.cc:939
Transaction_ctx * get_transaction()
Definition: sql_class.h:2039
const Lock_descriptor & lock_descriptor() const
Definition: table.h:3470
const char * table_name
Definition: table.h:3453
XID_STATE * xid_state()
Definition: transaction_info.h:280
@ XA_ACTIVE
Definition: xa.h:298
bool has_state(xa_states state) const
Definition: xa.h:346
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:221
#define DBUG_TRACE
Definition: my_dbug.h:145
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:55
binary_log::gtids::gno_t rpl_gno
GNO, the second (numeric) component of a GTID, is an alias of binary_log::gtids::gno_t.
Definition: rpl_gtid.h:102
void create_compress_gtid_table_thread()
Create the compression thread to compress gtid_executed table.
Definition: rpl_gtid_persist.cc:801
void terminate_compress_gtid_table_thread()
Terminate the compression thread.
Definition: rpl_gtid_persist.cc:841
Gtid_table_persistor * gtid_table_persistor
Definition: mysqld.cc:1824
TODO: Move this structure to libbinlogevents/include/control_events.h when we start using C++11.
Definition: rpl_gtid.h:1065
thr_lock_type type
Definition: thr_lock.h:99
Definition: mysql_lex_string.h:39
const char * str
Definition: mysql_lex_string.h:40
@ TL_WRITE_ALLOW_WRITE
Definition: thr_lock.h:72
unsigned int uint
Definition: uca9-dump.cc:74