File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -66,9 +66,10 @@ my %NEED_PREPROCESS = (
66
66
);
67
67
68
68
my %NEED_POSTPROCESS = (
69
- info => 1,
70
- select => 1,
71
- quit => 1,
69
+ info => 1,
70
+ cluster_info => 1,
71
+ select => 1,
72
+ quit => 1,
72
73
);
73
74
74
75
my %ERR_PREFS_MAP = (
@@ -850,9 +851,10 @@ sub _process_success {
850
851
shift @{ $self -> {_processing_queue } };
851
852
852
853
if ( exists $NEED_POSTPROCESS { $cmd -> {name } } ) {
853
- if ( $cmd -> {name } eq ' info' ) {
854
- $reply = { map { split ( m / :/ , $_ , 2 ) }
855
- grep { m / ^[^#] / } split ( EOL, $reply ) };
854
+ if ( $cmd -> {name } eq ' info'
855
+ || $cmd -> {name } eq ' cluster_info' )
856
+ {
857
+ $reply = _parse_info($reply );
856
858
}
857
859
elsif ( $cmd -> {name } eq ' select' ) {
858
860
$self -> {database } = $cmd -> {args }[0];
@@ -868,6 +870,11 @@ sub _process_success {
868
870
return ;
869
871
}
870
872
873
+ sub _parse_info {
874
+ return { map { split ( m / :/ , $_ , 2 ) }
875
+ grep { m / ^[^#] / } split ( EOL, $_ [0] ) };
876
+ }
877
+
871
878
sub _disconnect {
872
879
my $self = shift ;
873
880
my $err = shift ;
You can’t perform that action at this time.
0 commit comments