We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
--column-statistics=0
1 parent c9b7a5e commit bb14b57Copy full SHA for bb14b57
src/DB_Command.php
@@ -474,7 +474,15 @@ public function export( $args, $assoc_args ) {
474
$assoc_args['result-file'] = $result_file;
475
}
476
477
- $command = '/usr/bin/env mysqldump --no-defaults %s';
+ $mysqldump_version = exec( "/usr/bin/env mysqldump --version --no-defaults" );
478
+ $mysqldump_version = preg_replace( "/^.+([0-9]+\.[0-9]+\.[0-9]+)(.+)$/", "$1", $mysqldump_version );
479
+
480
+ if ( version_compare( $mysqldump_version, '8.0', '>=' ) ) {
481
+ $command = '/usr/bin/env mysqldump --no-defaults --column-statistics=0 %s';
482
+ } else {
483
+ $command = '/usr/bin/env mysqldump --no-defaults %s';
484
+ }
485
486
$command_esc_args = array( DB_NAME );
487
488
if ( isset( $assoc_args['tables'] ) ) {
0 commit comments