LP #1610670: Consistent partial table dumps with mysqldump

Description

**Reported in Launchpad by Ryan Brothers last update 07-08-2016 12:00:05

I am running Percona Server 5.6 and using mysqldump to do partial table dumps for a large number of tables. I'm doing this by calling mysqldump once for each table, passing in a different --where clause for each table.

This method works great except that the dump as a whole isn't consistent because mysqldump created a separate transaction each time it was called.

I see that Percona Server supports the following statement where it pulls the snapshot details from another session:

START TRANSACTION WITH CONSISTENT SNAPSHOT FROM SESSION <session_id>;

Would it be possible to allow the session_id to be passed to mysqldump, perhaps as an argument to --single-transaction, and have it use that session rather than create a new snapshot?

Thanks for your help.

Environment

None

Smart Checklist

Activity

Show:

Julia Vural March 4, 2025 at 9:03 PM

It appears that this issue is no longer being worked on, so we are closing it for housekeeping purposes. If you believe the issue still exists, please open a new ticket after confirming it's present in the latest release.

Lalit Choudhary July 26, 2018 at 1:55 PM
Edited

Hi Rayn,

Thank you for the report.

have_snapshot_cloning system variable is implemented to help other utilities detect if the server supports the FROM SESSION extension. When available, the snapshot cloning feature and the syntax extension to START TRANSACTION WITH CONSISTENTSNAPSHOT are supported by the server, and the variable value is always YES.

Reference: https://www.percona.com/doc/percona-server/LATEST/management/start_transaction_with_consistent_snapshot.html

Currently FROM SESSION extension is not part of the mysqldump option, hence marking this as a feature request. 

Won't Do

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 24, 2018 at 9:59 AM
Updated March 4, 2025 at 9:03 PM
Resolved March 4, 2025 at 9:03 PM

Flag notifications