mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
MDEV-26: Global transaction ID.
Implement START SLAVE UNTIL master_gtid_pos = "<GTID position>". Add test cases, including a test showing how to use this to promote a new master among a set of slaves.
This commit is contained in:
parent
7202c21b34
commit
9fae993024
19 changed files with 1824 additions and 147 deletions
|
|
@ -711,6 +711,22 @@ void rpl_binlog_state::free()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
rpl_binlog_state::load(struct rpl_gtid *list, uint32 count)
|
||||
{
|
||||
uint32 i;
|
||||
|
||||
reset();
|
||||
for (i= 0; i < count; ++i)
|
||||
{
|
||||
if (update(&(list[i])))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
rpl_binlog_state::~rpl_binlog_state()
|
||||
{
|
||||
free();
|
||||
|
|
@ -1116,11 +1132,18 @@ slave_connection_state::remove(const rpl_gtid *in_gtid)
|
|||
|
||||
int
|
||||
slave_connection_state::to_string(String *out_str)
|
||||
{
|
||||
out_str->length(0);
|
||||
return append_to_string(out_str);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
slave_connection_state::append_to_string(String *out_str)
|
||||
{
|
||||
uint32 i;
|
||||
bool first;
|
||||
|
||||
out_str->length(0);
|
||||
first= true;
|
||||
for (i= 0; i < hash.records; ++i)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue