[MDEV-30168] mysqldump doesn't have an option for check_constraint_checks Created: 2022-12-06 Updated: 2022-12-26 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Backup |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | KB Benton | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
mysqldump doesn't have an option for check_constraint_checks on tables that implement a constraint check. That makes it impossible to restore tables completely when the table has invalid data in it and check_constraint_checks was turned off when the constraint was implemented. For example,
... is run with a few rows of known bad data in it then a mysqldump is run, it's not possible to do a full restore without mangling the backup. If mysqldump had --check-constraint-checks=0 as an option, we could tell the dump to put SET @@SESSION.CHECK_CONSTRAINT_CHECKS = 0 in it on tables that have a constraint on them or for the entire backup... You get the idea. |