MT#63507 fix delete_loop copying records to next month table

commit 74f22addc intruduced a bug that results in copying eg.
july CDRs into august backup table. datetime obejcts are not
immutable, so clone it before modifying.

Change-Id: I12a52b1de7f4f5f68397148cd206035d2ac0b6b7
mr13.5
Rene Krenn 4 months ago
parent ee6679c7bf
commit 18ba370475

@ -493,7 +493,7 @@ sub delete_loop {
my $col_mode = $self->env('time-column-mode');
my $mstart = $bm->strftime('%Y-%m-01 00:00:00');
my $mend = $bm->add(months => 1)->strftime('%Y-%m-%d %H:%M:%S');
my $mend = $bm->clone->add(months => 1)->strftime('%Y-%m-%d %H:%M:%S');
my $mtable = $table . '_' . $bm->strftime('%Y%m');
$self->debug("table=$table backup=$mtable");

Loading…
Cancel
Save