Fixed some issues on GTID implementation and added support for storing table replication consistency metadata on MySQL server.

This commit is contained in:
Jan Lindström
2013-07-23 07:44:28 +03:00
parent c84f4e099a
commit f7ddfa73bf
10 changed files with 748 additions and 63 deletions

View File

@ -183,10 +183,12 @@ class Gtid_event: public Binary_log_event
{
public:
Gtid_event(Log_event_header *header) : Binary_log_event(header) {}
size_t gtid_length() { return MYSQL_GTID_ENCODED_SIZE;}
boost::uint32_t domain_id;
boost::uint32_t server_id;
boost::uint64_t sequence_number;
char m_mysql_gtid[MYSQL_GTID_ENCODED_SIZE];
unsigned char m_mysql_gtid[MYSQL_GTID_ENCODED_SIZE];
Gtid m_gtid;
};

View File

@ -50,8 +50,9 @@ class Gtid
{
public:
Gtid()
: m_real_gtid(false), m_domain_id(0), m_server_id(0), m_sequence_number(0), m_server_type(MYSQL_SERVER_TYPE_NA)
Gtid()
: m_real_gtid(false), m_domain_id(0), m_server_id(0), m_sequence_number(0),
m_server_type(MYSQL_SERVER_TYPE_NA), m_gtid_length(0)
{
memset(m_mysql_gtid, 0, MYSQL_GTID_ENCODED_SIZE);
}
@ -60,16 +61,21 @@ class Gtid
const boost::uint32_t server_id,
const boost::uint64_t sequence_number);
Gtid(const char *mysql_gtid,
Gtid(const unsigned char *mysql_gtid,
const boost::uint64_t gno);
Gtid(const char *mysql_gtid);
Gtid(const unsigned char *mysql_gtid);
~Gtid() {}
bool is_real_gtid() const { return m_real_gtid;}
const char* get_mysql_gtid() const { return m_mysql_gtid; }
const unsigned char* get_mysql_gtid() const { return m_mysql_gtid; }
const unsigned char* get_gtid() const;
size_t get_gtid_length() const { return m_gtid_length; }
std::string get_string() const;
@ -85,8 +91,10 @@ class Gtid
boost::uint32_t m_domain_id;
boost::uint32_t m_server_id;
boost::uint64_t m_sequence_number;
boost::uint32_t m_gtid_length;
char m_mysql_gtid[MYSQL_GTID_ENCODED_SIZE];
unsigned char m_mysql_gtid[MYSQL_GTID_ENCODED_SIZE];
std::string m_mariadb_gtid;
};
}