24#ifndef MYSQL_GTID_GTIDSET_H
25#define MYSQL_GTID_GTIDSET_H
29#ifndef NO_DEPRECATION_WARNING_FOR_HEADER_GTIDSET_H
217 virtual std::size_t
count()
const;
257 [[nodiscard]]
virtual bool do_add(
const Tsid &tsid,
259 [[nodiscard]]
virtual bool do_add(
const Uuid &uuid,
const Tag &tag,
318 [[nodiscard]]
virtual bool add(
const Tsid &tsid,
359 virtual bool add(
const Gtid >id);
385 virtual void reset();
400 virtual std::size_t
count()
const;
This class represents a range of transaction identifiers.
Definition: gtidset.h:59
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:79
virtual bool operator==(const Gno_interval &other) const
Compares this interval with another one.
Definition: gtidset.cpp:50
static const std::string SEPARATOR_GNO_START_END
In 'UUID:GNO-GNO', this is the '-'.
Definition: gtidset.h:62
gno_t m_start
Definition: gtidset.h:65
virtual ~Gno_interval()=default
Gno_interval(const Gno_interval &other)
Construct a new Gno_interval object from the other one provided.
Definition: gtidset.cpp:41
virtual gno_t get_start() const
Gets the first sequence number in the interval.
Definition: gtidset.cpp:83
virtual std::string to_string() const
Gets a human readable representation of this identifier.
Definition: gtidset.cpp:95
gno_t m_next_gno_after_end
Definition: gtidset.h:66
Gno_interval & operator=(const Gno_interval &other)
Copy assignment.
Definition: gtidset.cpp:44
virtual bool intersects(const Gno_interval &other) const
This checks whether this interval intersects with the other.
Definition: gtidset.cpp:63
virtual bool add(const Gno_interval &other)
Adds the other interval to this one.
Definition: gtidset.cpp:86
virtual gno_t get_end() const
Gets the last sequence number in the interval.
Definition: gtidset.cpp:84
virtual std::size_t count() const
Number of entries in this interval.
Definition: gtidset.cpp:34
virtual bool operator<(const Gno_interval &other) const
Establishes a total order between two intervals.
Definition: gtidset.cpp:55
virtual bool contiguous(const Gno_interval &other) const
Checks if this interval is contiguous with the other one.
Definition: gtidset.cpp:73
virtual bool is_valid() const
Checks whether this interval is valid or not.
Definition: gtidset.cpp:104
This class represents a set of transaction identifiers.
Definition: gtidset.h:246
virtual std::size_t count() const
Gets the number of entries in this set.
Definition: gtidset.cpp:281
virtual std::string to_string() const
A human readable representation of this set.
Definition: gtidset.cpp:229
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:252
virtual bool operator==(const Gtid_set &other) const
Compares this set with another one.
Definition: gtidset.cpp:117
virtual bool do_add(const Tsid &tsid, const Gno_interval &interval)
Definition: gtidset.cpp:163
std::map< Uuid, Tag_interval_map > Tsid_interval_map
Definition: gtidset.h:271
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:269
static const std::string separator_interval
In 'UUID:INTERVAL:INTERVAL', this is the second ':'.
Definition: gtidset.h:250
virtual Gtid_format get_gtid_set_format() const
Iterates through recorded TSIDs and returns format of the Gtid_set.
Definition: gtidset.cpp:297
static const std::string empty_gtid_set_str
Definition: gtidset.h:248
virtual bool add(const Tsid &tsid, const Gno_interval &interval)
Adds a new interval indexed by the given uuid.
Definition: gtidset.cpp:209
virtual void reset()
Resets this set, making it empty.
Definition: gtidset.cpp:295
virtual const Tsid_interval_map & get_gtid_set() const
Gets a copy of the internal set.
Definition: gtidset.cpp:159
virtual bool contains(const Gtid >id) const
Checks whether this set contains the given identifier.
Definition: gtidset.cpp:256
virtual bool is_empty() const
Returns true if this is an empty set.
Definition: gtidset.cpp:279
std::map< Tag, Interval_set > Tag_interval_map
Definition: gtidset.h:270
Tsid_interval_map m_gtid_set
An ordered map of entries mapping Uuid to a list of intervals.
Definition: gtidset.h:406
Gtid_set & operator=(const Gtid_set &other)
Copy assignment.
Definition: gtidset.cpp:110
virtual std::size_t get_num_tsids() const
Get the num TSIDs held in the GTID set.
Definition: gtidset.cpp:271
Represents a MySQL Global Transaction Identifier.
Definition: gtid.h:47
Representation of the GTID tag.
Definition: tag.h:49
Represents Transaction Source Identifier which is composed of source UUID and transaction tag.
Definition: tsid.h:44
#define DEPRECATE_HEADER(header_name)
Definition: deprecate_header.h:34
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:180
static int interval
Definition: mysqladmin.cc:72
Gtid_format
Gtid binary format indicator.
Definition: gtid_format.h:39
std::int64_t gno_t
Definition: global.h:37
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