Bug #73371 mysqldump --single transaction should use read only transactions
Submitted: 24 Jul 2014 9:43 Modified: 17 Jul 2015 14:19
Reporter: Aleksandar Ivanisevic Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S4 (Feature request)
Version:5.6.5+ OS:Any
Assigned to: CPU Architecture:Any
Tags: mysqldump, transactions

[24 Jul 2014 9:43] Aleksandar Ivanisevic
Description:
Hi,

since 5.6.5 we have read only transactions, so mysqldump should use them when --single-transaction is used, obviously a database dump will never write, just read.

thanks and regards,

How to repeat:
do a mysqldump --single-transaction on e.g. a table with auto_increment

while mysqldump is running try writing new records in the table, the writes will wait for the dump to finich since it holds the lock on the auto increment column assuming the mysqldump transaction might write new records.

Suggested fix:
use START TRANSACTION READ ONLY instead of START TRANSACTION
[17 Jul 2015 14:19] Georgi Kodinov
Thank you for the very reasonable feature request.