mysql gtid backup bug
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Triaged
|
High
|
Unassigned | |||
5.7 |
Triaged
|
High
|
Unassigned |
Bug Description
When we use mysqldump to dump database with --single-
But it can't get the consist gtid when use single-transaction without ftwrl. So ,it's very dangerous use the dump file header include gtid_purged to construct slave use gtid.
code :
if use --single-
mysqldump use the function to get gtid without any lock.
static my_bool add_set_
{
MYSQL_RES *gtid_purged_res;
MYSQL_ROW gtid_set;
ulong num_sets, idx;
/* query to get the GTID_EXECUTED */
if (mysql_
return TRUE;
/* Proceed only if gtid_purged_res is non empty */
if ((num_sets= mysql_num_
{
if (opt_comments)
fprintf(
"\n--\n-- GTID state at the beginning of the backup \n--\n\n");
fprintf(
/* formatting is not required, even for multiple gtid sets */
for (idx= 0; idx< num_sets-1; idx++)
{
gtid_set= mysql_fetch_
fprintf(
}
/* for the last set */
gtid_set= mysql_fetch_
/* close the SET expression */
fprintf(
}
return FALSE; /*success */
}
information type: | Public Security → Public |
tags: | added: consistent-binlog-snapshot |
from Valerii Kravchuk : snapshot_ %'"
In MariaDB's mysqldump.c though the function is used: BINLOG_GTID_POS()
based on outputs of "SHOW STATUS LIKE 'binlog_
So, MariaDB's mysqldump works correctly with MariaDB servr and its GTIDs, Percona's implementation must fail.