[MDEV-28074] mysqldump --order-by-size Created: 2022-03-16  Updated: 2022-04-13  Resolved: 2022-04-13

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Fix Version/s: 10.9.1

Type: Task Priority: Major
Reporter: Daniel Black Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-25571 mariadb-dump support for backup lock Open

 Description   

While dumping large database with --single-transaction option, there is a chance, that a table will be truncated during dump, resulting 'Table definition has changed, please retry transaction' error.

In some cases, it means that dumping database always fails, i.e. when a table, that gets often truncated, is dumped after a large table.

In environments, where changing database layout or backup strategy is not trivial, it makes using --single-transaction problematic.

The suggested --order-by-size option will dump tables according to their size, smaller tables first.
--order-by-size cannot be used when one is specifying table names on the command line.

Assuming, that truncated tables are usually small, dumping small tables first greatly reduces such errors.



 Comments   
Comment by Michael Widenius [ 2022-04-13 ]

Pushed to 10.9 tree

Generated at Thu Feb 08 09:57:51 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.