[MDEV-6742] Documentation: Possibly incorrect behavior of mysqldump --master-data? Created: 2014-09-14  Updated: 2015-01-28  Resolved: 2014-10-09

Status: Closed
Project: MariaDB Server
Component/s: Documentation
Affects Version/s: 10.0.13
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Will Bryant Assignee: Ian Gilfillan
Resolution: Fixed Votes: 0
Labels: documentation


 Description   

I believe that in mariadb 5.3 mysqldump was improved to use the consistent transaction vs. binlog position instead of FLUSH TABLES WITH READ LOCK.

But I'm not sure that the KB documentation for mysqldump has been updated
In the first paragraph of the --master-data description on https://mariadb.com/kb/en/mariadb/documentation/clients-and-utilities/backup-restore-and-import/mysqldump/, it says: "This option will turn --lock-all-tables on, unless --single-transaction is specified too (on servers before MariaDB 5.3 this will take a global read lock for a short time at the beginning of the dump; don't forget to read about --single-transaction below)."

This is not super clear but can be interpreted as consistent with the 5.3 improvement.

But a later paragraph says "The --master-data option automatically turns off --lock-tables. It also turns on --lock-all-tables, unless --single-transaction also is specified, in which case, a global read lock is acquired only for a short time at the beginning of the dump (see the description for --single-transaction)."

My reading of that is that FLUSH TABLES WITH READ LOCK would be used if you use --single-transaction and --master-data together - and I thought this was the problem that was fixed by the improvement in 5.3 so a global read lock is no longer needed.

Is this correct?

NB. `man mysqldump` for 10.0 has the same content as the KB - and that sentence is the same as in mysql 5.5.



 Comments   
Comment by Elena Stepanova [ 2014-09-27 ]

At the very least these two paragraphs duplicate each other, it needs to be fixed. Also, I agree that neither of them is clear enough about which locks in which version and for what period of time are taken.

Comment by Ian Gilfillan [ 2014-10-02 ]

It looks like a new paragraph was just added to the top of the original documentation. The duplication has now been removed and clarified.

Generated at Thu Feb 08 07:14:15 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.