From a7fbb84777f09bb74dfdd0a0ed1f24455798d9d5 Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Fri, 2 Aug 2019 12:01:04 +0200 Subject: [PATCH] TT#62907 add a fallback to sql backup * if a use-partitioning is enabled for a table and this table is not suitable for it, the table is processed using the sql backup method. Change-Id: Ia3d8bc4701cc31fed54465227e49ec4563e5c100 --- lib/NGCP/Cleanup.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/NGCP/Cleanup.pm b/lib/NGCP/Cleanup.pm index 061ee96..1400ebb 100644 --- a/lib/NGCP/Cleanup.pm +++ b/lib/NGCP/Cleanup.pm @@ -578,7 +578,11 @@ sub backup_table { my $use_part = $self->env('use-partitioning') // 'no'; if ($use_part eq 'yes') { - $self->update_partitions($table); + eval { $self->update_partitions($table) }; + if ($EVAL_ERROR) { + $self->debug("table=$table cannot be used for partitioning, falling back to sql backups"); + $use_part = 'no'; + } } my $data_moved = 0;;