24#ifndef MYSQL_GTID_GTID_SET_H
25#define MYSQL_GTID_GTID_SET_H
212 virtual std::size_t
count()
const;
354 virtual bool add(
const Gtid >id);
380 virtual void reset();
395 virtual std::size_t
count()
const;
This class represents a range of transaction identifiers.
Definition: gtidset.h:54
virtual bool intersects_or_contiguous(const Gno_interval &other) const
Checks if the other interval intersects or is contiguous with this one.
Definition: gtidset.cpp:75
virtual bool operator==(const Gno_interval &other) const
Compares this interval with another one.
Definition: gtidset.cpp:46
static const std::string SEPARATOR_GNO_START_END
In 'UUID:GNO-GNO', this is the '-'.
Definition: gtidset.h:57
gno_t m_start
Definition: gtidset.h:60
virtual ~Gno_interval()=default
Gno_interval(const Gno_interval &other)
Construct a new Gno_interval object from the other one provided.
Definition: gtidset.cpp:37
virtual gno_t get_start() const
Gets the first sequence number in the interval.
Definition: gtidset.cpp:79
virtual std::string to_string() const
Gets a human readable representation of this identifier.
Definition: gtidset.cpp:91
gno_t m_next_gno_after_end
Definition: gtidset.h:61
Gno_interval & operator=(const Gno_interval &other)
Copy assignment.
Definition: gtidset.cpp:40
virtual bool intersects(const Gno_interval &other) const
This checks whether this interval intersects with the other.
Definition: gtidset.cpp:59
virtual bool add(const Gno_interval &other)
Adds the other interval to this one.
Definition: gtidset.cpp:82
virtual gno_t get_end() const
Gets the last sequence number in the interval.
Definition: gtidset.cpp:80
virtual std::size_t count() const
Number of entries in this interval.
Definition: gtidset.cpp:30
virtual bool operator<(const Gno_interval &other) const
Establishes a total order between two intervals.
Definition: gtidset.cpp:51
virtual bool contiguous(const Gno_interval &other) const
Checks if this interval is contiguous with the other one.
Definition: gtidset.cpp:69
virtual bool is_valid() const
Checks whether this interval is valid or not.
Definition: gtidset.cpp:100
This class represents a set of transaction identifiers.
Definition: gtidset.h:241
virtual std::size_t count() const
Gets the number of entries in this set.
Definition: gtidset.cpp:277
virtual std::string to_string() const
A human readable representation of this set.
Definition: gtidset.cpp:225
Gtid_set(const Gtid_set &other)=delete
static const std::string separator_uuid_set
In 'SID:GNO,SID:GNO', this is the ','.
Definition: gtidset.h:247
virtual bool operator==(const Gtid_set &other) const
Compares this set with another one.
Definition: gtidset.cpp:113
virtual bool do_add(const Tsid &tsid, const Gno_interval &interval)
Definition: gtidset.cpp:159
std::map< Uuid, Tag_interval_map > Tsid_interval_map
Definition: gtidset.h:266
std::set< Gno_interval > Interval_set
Tsid_interval_map is a 2-level map between tsids and an ordered set of Gno_intervals.
Definition: gtidset.h:264
static const std::string separator_interval
In 'UUID:INTERVAL:INTERVAL', this is the second ':'.
Definition: gtidset.h:245
virtual Gtid_format get_gtid_set_format() const
Iterates through recorded TSIDs and returns format of the Gtid_set.
Definition: gtidset.cpp:293
static const std::string empty_gtid_set_str
Definition: gtidset.h:243
virtual bool add(const Tsid &tsid, const Gno_interval &interval)
Adds a new interval indexed by the given uuid.
Definition: gtidset.cpp:205
virtual void reset()
Resets this set, making it empty.
Definition: gtidset.cpp:291
virtual const Tsid_interval_map & get_gtid_set() const
Gets a copy of the internal set.
Definition: gtidset.cpp:155
virtual bool contains(const Gtid >id) const
Checks whether this set contains the given identifier.
Definition: gtidset.cpp:252
virtual bool is_empty() const
Returns true if this is an empty set.
Definition: gtidset.cpp:275
std::map< Tag, Interval_set > Tag_interval_map
Definition: gtidset.h:265
Tsid_interval_map m_gtid_set
An ordered map of entries mapping Uuid to a list of intervals.
Definition: gtidset.h:401
Gtid_set & operator=(const Gtid_set &other)
Copy assignment.
Definition: gtidset.cpp:106
virtual std::size_t get_num_tsids() const
Get the num TSIDs held in the GTID set.
Definition: gtidset.cpp:267
Represents a MySQL Global Transaction Identifier.
Definition: gtid.h:51
Representation of the GTID tag.
Definition: tag.h:51
Represents Transaction Source Identifier which is composed of source UUID and transaction tag.
Definition: tsid.h:47
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:180
static int interval
Definition: mysqladmin.cc:71
Gtid_format
Gtid binary format indicator.
Definition: gtid_format.h:38
std::int64_t gno_t
Definition: global.h:37
#define NODISCARD
The function attribute [[NODISCARD]] is a replacement for [[nodiscard]] to workaround a gcc bug.
Definition: nodiscard.h:47
mysql::gtid::Tsid Tsid
Definition: rpl_gtid_state.cc:56
Uuid is a trivial and of standard layout The structure contains the following components.
Definition: uuid.h:64