24#ifndef RPL_GTID_PERSIST_H_
25#define RPL_GTID_PERSIST_H_
35#include "mysqld_error.h"
Represents a set of GTIDs.
Definition: rpl_gtid.h:1455
Definition: rpl_gtid_persist.h:46
void before_open(THD *thd) override
Prepares before opening table.
Definition: rpl_gtid_persist.cc:125
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:173
Gtid_table_access_context & operator=(const Gtid_table_access_context &info)
bool m_is_write
Definition: rpl_gtid_persist.h:104
static const LEX_CSTRING DB_NAME
Definition: rpl_gtid_persist.h:48
THD * m_drop_thd_object
Definition: rpl_gtid_persist.h:102
static const LEX_CSTRING TABLE_NAME
Definition: rpl_gtid_persist.h:49
Gtid_table_access_context()
Definition: rpl_gtid_persist.h:51
ulonglong m_tmp_disable_binlog__save_options
Definition: rpl_gtid_persist.h:108
~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:136
void drop_thd(THD *thd)
Definition: rpl_gtid_persist.cc:120
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:107
Gtid_table_access_context(const Gtid_table_access_context &info)
Open_tables_backup m_backup
Definition: rpl_gtid_persist.h:106
bool m_skip_readonly_set
Definition: rpl_gtid_persist.h:111
Definition: rpl_gtid_persist.h:119
std::atomic< int64 > m_atomic_count
Definition: rpl_gtid_persist.h:239
int save(THD *thd, const Gtid *gtid)
Insert the gtid into table.
Definition: rpl_gtid_persist.cc:340
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:208
Gtid_table_persistor & operator=(const Gtid_table_persistor &info)
static const uint number_fields
Definition: rpl_gtid_persist.h:121
int compress(THD *thd)
Compress the gtid_executed table completely by employing one or more transactions.
Definition: rpl_gtid_persist.cc:481
std::string encode_gtid_text(TABLE *table)
Encode the current row fetched from the table into gtid text.
Definition: rpl_gtid_persist.cc:626
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:209
int reset(THD *thd)
Delete all rows from the table.
Definition: rpl_gtid_persist.cc:602
int delete_all(TABLE *table)
Delete all rows in the gtid_executed table.
Definition: rpl_gtid_persist.cc:704
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:271
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:500
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:532
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:644
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:658
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:239
Storage for backup of Open_tables_state.
Definition: sql_class.h:688
A base class for accessing a system table.
Definition: rpl_table_access.h:40
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
void raise_error_printf(uint code,...)
Raise an exception condition, with a formatted message.
Definition: sql_class.cc:924
bool is_operating_gtid_table_implicitly
Definition: sql_class.h:2289
void raise_warning_printf(uint code,...)
Raise a completion condition (warning), with a formatted message.
Definition: sql_class.cc:941
Transaction_ctx * get_transaction()
Definition: sql_class.h:2063
const Lock_descriptor & lock_descriptor() const
Definition: table.h:3505
const char * table_name
Definition: table.h:3488
XID_STATE * xid_state()
Definition: transaction_info.h:281
@ XA_ACTIVE
Definition: xa.h:299
bool has_state(xa_states state) const
Definition: xa.h:347
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:222
#define DBUG_TRACE
Definition: my_dbug.h:146
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
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:103
void create_compress_gtid_table_thread()
Create the compression thread to compress gtid_executed table.
Definition: rpl_gtid_persist.cc:802
void terminate_compress_gtid_table_thread()
Terminate the compression thread.
Definition: rpl_gtid_persist.cc:842
Gtid_table_persistor * gtid_table_persistor
Definition: mysqld.cc:1835
TODO: Move this structure to libbinlogevents/include/control_events.h when we start using C++11.
Definition: rpl_gtid.h:1066
thr_lock_type type
Definition: thr_lock.h:100
Definition: mysql_lex_string.h:40
const char * str
Definition: mysql_lex_string.h:41
@ TL_WRITE_ALLOW_WRITE
Definition: thr_lock.h:73
unsigned int uint
Definition: uca9-dump.cc:75