Bug #46420 mysqldump should flush logs only once when --single-transaction is specified
Submitted: 28 Jul 2009 3:14
Reporter: Mikiya Okuno Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: mysqldump Command-line Client Severity:S4 (Feature request)
Version:5.1.36 OS:Any
Assigned to: CPU Architecture:Any

[28 Jul 2009 3:14] Mikiya Okuno
"mysqldump --all-databases --single-transaction" flushes logs when it start dumping every database, which flushes are performed in dump_all_tables_in_db() or dump_all_views_in_db(). Such flushes are totally unnecessary. So, mysqldump should flush only once at the beginning of the command.

Although, it can be achieved by using --master-data option along with --single-transaction option, but it's not intuitive. Instead, --single-transaction itself should do so if --flush-log option is specified. Otherwise, each log rotation results in useless.

How to repeat:

Suggested fix: