port mariaDB code enhancement for start transaction with consistent snapshot

Registered by Ryan Huddleston

https://kb.askmonty.org/en/enhancements-for-start-transaction-with-consistent/

This feature is quite useful to obtain logical backups with correct positions without needed a flush tables with read lock

Blueprint information

Status:
Complete
Approver:
Alexey Kopytov
Priority:
High
Drafter:
Alexey Kopytov
Direction:
Approved
Assignee:
Alexey Kopytov
Definition:
Approved
Series goal:
Accepted for 5.6
Implementation:
Implemented
Milestone target:
milestone icon 5.6.17-66.0
Started by
Alexey Kopytov
Completed by
Alexey Kopytov

Whiteboard

This is a port of MariaDB's enhancements described at
https://mariadb.com/kb/en/enhancements-for-start-transaction-with-consistent/
to MySQL 5.6 group commit implementation.

The new functionality is that START TRANSACTION WITH CONSISTENT SNAPSHOT
is guaranteed to be atomic across all storage engines that support
consistent snapshots. This means that no storage engine is allowed to
commit until START TRANSACTION WITH CONSISTENT SNAPSHOT completes
snapshot initialization for all available storage engines.

Binary log API has been modified to participate in START TRANSACTION
WITH CONSISTENT SNAPSHOT. This allows to get a consistent snapshot of
the binary log coordinates in addition to a consistent data snapshot.

New status variables to expose those snapshots of binary log coordinates
are:

Binlog_snapshot_file

and

Binlog_snapshot_position

The status variables are only available when the binary log is enabled globally.

mysqldump has been updated to use those variables automatically when
they are supported by the server and both --single-transaction and
--master-data are specified on the command line. Along with the mysqldump
improvements introduced in
https://blueprints.launchpad.net/percona-server/+spec/backup-locks
there is now a way to generated mysqldump backups that are guaranteed to
be consistent without using FTWRL even if --master-data is requested.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.