File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -474,11 +474,10 @@ public function export( $args, $assoc_args ) {
474
474
$ assoc_args ['result-file ' ] = $ result_file ;
475
475
}
476
476
477
- $ mysqldump_version = exec ( "/usr/bin/env mysqldump --version --no-defaults " );
478
- $ mysqldump_version = preg_replace ( "/^.+([0-9]+\.[0-9]+\.[0-9]+)(.+)$/ " , "$1 " , $ mysqldump_version );
477
+ $ support_column_statistics = exec ( 'mysqldump --help | grep "column-statistics" ' );
479
478
480
- if ( version_compare ( $ mysqldump_version , ' 8.0 ' , ' >= ' ) ) {
481
- $ command = '/usr/bin/env mysqldump --no-defaults --column-statistics=0 %s ' ;
479
+ if ( $ support_column_statistics ) {
480
+ $ command = '/usr/bin/env mysqldump --no-defaults --skip- column-statistics %s ' ;
482
481
} else {
483
482
$ command = '/usr/bin/env mysqldump --no-defaults %s ' ;
484
483
}
You can’t perform that action at this time.
0 commit comments