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