option dumpdir stop dumping pfs request result
dumpdir option successed dumping x$ views :)
This commit is contained in:
parent
89619dc379
commit
e7e045bb17
1 changed files with 6 additions and 2 deletions
|
@ -1091,6 +1091,7 @@ sub select_csv_file {
|
||||||
my $tfile = shift;
|
my $tfile = shift;
|
||||||
my $req = shift;
|
my $req = shift;
|
||||||
debugprint "PERFORM: $req CSV into $tfile";
|
debugprint "PERFORM: $req CSV into $tfile";
|
||||||
|
#return;
|
||||||
my @result = select_array_with_headers($req);
|
my @result = select_array_with_headers($req);
|
||||||
open( my $fh, '>', $tfile ) or die "Could not open file '$tfile' $!";
|
open( my $fh, '>', $tfile ) or die "Could not open file '$tfile' $!";
|
||||||
for my $l (@result) {
|
for my $l (@result) {
|
||||||
|
@ -3990,6 +3991,7 @@ sub mysql_pfs {
|
||||||
subheaderprint "Performance schema";
|
subheaderprint "Performance schema";
|
||||||
|
|
||||||
# Performance Schema
|
# Performance Schema
|
||||||
|
debugprint "Performance schema is " . $myvar{'performance_schema'};
|
||||||
$myvar{'performance_schema'} = 'OFF'
|
$myvar{'performance_schema'} = 'OFF'
|
||||||
unless defined( $myvar{'performance_schema'} );
|
unless defined( $myvar{'performance_schema'} );
|
||||||
if ( $myvar{'performance_schema'} eq 'OFF' ) {
|
if ( $myvar{'performance_schema'} eq 'OFF' ) {
|
||||||
|
@ -4025,12 +4027,14 @@ sub mysql_pfs {
|
||||||
if ( defined $opt{dumpdir} and -d "$opt{dumpdir}" ) {
|
if ( defined $opt{dumpdir} and -d "$opt{dumpdir}" ) {
|
||||||
for my $sys_view ( select_array('use sys;show tables;') ) {
|
for my $sys_view ( select_array('use sys;show tables;') ) {
|
||||||
infoprint "Dumping $sys_view into $opt{dumpdir}";
|
infoprint "Dumping $sys_view into $opt{dumpdir}";
|
||||||
|
my $sys_view_table=$sys_view;
|
||||||
|
$sys_view_table =~ s/\$/\\\$/g;
|
||||||
select_csv_file(
|
select_csv_file(
|
||||||
"$opt{dumpdir}/sys_$sys_view.csv",
|
"$opt{dumpdir}/sys_$sys_view.csv",
|
||||||
"select * from sys.\`$sys_view\`"
|
'select * from sys.\`' . $sys_view_table. '\`'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
#exit 0 if ( $opt{stop} == 1 );
|
#exit 0 if ( $opt{stop} == 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue