mysqldump maybe inconsistent by binlog_snapshot_file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
New
|
Undecided
|
Unassigned |
Bug Description
When mysqldump use binlog_
I found this bug by debug other features,and is difficult for reproduce by a testcase,So I describe it by some fake code as follows(
First,describe two function's process
-------
In function2: MYSQL_BIN_
#step 1
lock(LOCK_log)
flushing transactions to binary log
....
unlock(LOCK_log)
#step 2
lock(LOCK_sync);
Syncing binary log file to disk
.....
unlock(LOCK_SYNC)
#step 3
lock(LOCK_commit)
Commit all transactions in order.
....
unlock(
In function2: ha_start_
lock(LOCK_log)
lock(LOCK_commit)
get binlog filename, binlog pos
....
unlock(
unlock(LOCK_log)
-------
For example, we do an insert, If function1 had flush and sync binlog to disk(thus, binlog file,pos info had modified)at step1, step2, but not lock LOCK_commit and not commit yet at step 3;At the same time, other session(i.e. mysqldump) do function2, and got the newest binlog_file,pos which had include the latest record, but InnoDB not commit yet,so under this snapshot,select can't see the uncommitted record and backup not。
Fix suggest:
when do MYSQL_BIN_
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PS-3622