line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MySQL::Partition::Type::List; |
2
|
1
|
|
|
1
|
|
969
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
49
|
|
3
|
1
|
|
|
1
|
|
28
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
999
|
use parent 'MySQL::Partition'; |
|
1
|
|
|
|
|
356
|
|
|
1
|
|
|
|
|
6
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub _build_partition_part { |
8
|
3
|
|
|
3
|
|
13
|
my ($self, $partition_name, $partition_description) = @_; |
9
|
|
|
|
|
|
|
|
10
|
3
|
|
|
|
|
3
|
my $comment; |
11
|
3
|
100
|
66
|
|
|
17
|
if (ref $partition_description && ref $partition_description eq 'HASH') { |
12
|
1
|
|
|
|
|
4
|
$comment = $partition_description->{comment}; |
13
|
1
|
50
|
|
|
|
5
|
$comment =~ s/'//g if defined $comment; |
14
|
1
|
|
|
|
|
4
|
$partition_description = $partition_description->{description}; |
15
|
1
|
50
|
|
|
|
8
|
die 'no partition_description is specified' unless $partition_description; |
16
|
|
|
|
|
|
|
} |
17
|
3
|
|
|
|
|
18
|
my $part = sprintf 'PARTITION %s VALUES IN (%s)', $partition_name, $partition_description; |
18
|
3
|
100
|
|
|
|
11
|
$part .= " COMMENT = '$comment'" if $comment; |
19
|
3
|
|
|
|
|
19
|
$part; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
__END__ |