Add an option to place MDL locks on tables while they are copied

Registered by Sergei Glushchenko

We need this to workaround issue with MySQL 5.7 skipping redo log for DDL. Xtrabackup will start transaction and select one record from a table just before it starts to copy it. Xtrabackup will commit these transactions once backup is complete.

Add three options:

`--lock-ddl' to issue `LOCK TABLES FOR BACKUP' at the beginning of the
backup if it is supported by server. Backup aborts if `LOCK TABLES FOR
BACKUP' is not supported.

`--lock-ddl-timeout' to set timeout for `LOCK TABLES FOR BACKUP' to wait
for lock.

`--lock-ddl-per-table' during the datafiles copy process, xtrabackup
will place MDL lock (using the `SELECT * LIMIT 1' inside of transaction)
for each table it starting to copy. Locks are released at the end of the
backup by committing transaction.

Blueprint information

Status:
Complete
Approver:
Sergei Glushchenko
Priority:
High
Drafter:
Sergei Glushchenko
Direction:
Needs approval
Assignee:
Sergei Glushchenko
Definition:
Approved
Series goal:
Accepted for 2.4
Implementation:
Implemented
Milestone target:
milestone icon 2.4.8
Started by
Sergei Glushchenko
Completed by
Sergei Glushchenko

Related branches

Sprints

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.