Difference between revisions of "Mysqldump --single-transaction"
Jump to navigation
Jump to search
(Created page with " {{mysqldump}}") |
|||
Line 1: | Line 1: | ||
+ | {{{lc}} | ||
+ | |||
+ | --single-transaction | ||
+ | Creates a consistent snapshot by dumping all tables in a | ||
+ | single transaction. Works ONLY for tables stored in | ||
+ | storage engines which support multiversioning (currently | ||
+ | only InnoDB does); the dump is NOT guaranteed to be | ||
+ | consistent for other storage engines. While a | ||
+ | --single-transaction dump is in process, to ensure a | ||
+ | valid dump file (correct table contents and binary log | ||
+ | position), no other connection should use the following | ||
+ | statements: ALTER TABLE, DROP TABLE, RENAME TABLE, | ||
+ | TRUNCATE TABLE, as consistent snapshot is not isolated | ||
+ | from them. Option automatically turns off --lock-tables. | ||
{{mysqldump}} | {{mysqldump}} |
Revision as of 06:19, 9 June 2024
{
--single-transaction Creates a consistent snapshot by dumping all tables in a single transaction. Works ONLY for tables stored in storage engines which support multiversioning (currently only InnoDB does); the dump is NOT guaranteed to be consistent for other storage engines. While a --single-transaction dump is in process, to ensure a valid dump file (correct table contents and binary log position), no other connection should use the following statements: ALTER TABLE, DROP TABLE, RENAME TABLE, TRUNCATE TABLE, as consistent snapshot is not isolated from them. Option automatically turns off --lock-tables.
Advertising: