TT#3668 fix time-column to be used for partitioning table

* start_time cannot be used there as a constant because
      cdr_* extended tables have a different name for the column

Change-Id: I79b030e6a8b6d6e855f9ed7c0a1509685ab34e7f
changes/04/17004/1
Kirill Solomko 9 years ago
parent 84a114daec
commit cca8452669

@ -284,10 +284,11 @@ SQL
sub create_partitions {
my ($self, $table, $mpart, $mdt, $gap) = @_;
my $dbh = $self->env('dbh');
my $col = $self->env('time-column');
my $parts = $self->build_partitions_list($table, $mpart, $mdt, $gap);
my $sql = <<SQL;
ALTER TABLE $table PARTITION BY RANGE(FLOOR(start_time))
ALTER TABLE $table PARTITION BY RANGE(FLOOR($col))
(
$parts
);

Loading…
Cancel
Save