From 552ca9722208d42ad4d39684bcd1390f2eabd8d3 Mon Sep 17 00:00:00 2001 From: Jack Lowrie Date: Sun, 3 Nov 2019 13:07:40 -0600 Subject: [PATCH 1/7] phpcs --- features/bootstrap/FeatureContext.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php index 07c107826..47c69f458 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -856,7 +856,14 @@ public function install_wp( $subdir = '' ) { if ( $install_cache_path ) { mkdir( $install_cache_path ); self::dir_diff_copy( $run_dir, self::$cache_dir, $install_cache_path ); - self::run_sql( 'mysqldump --no-defaults', array( 'result-file' => "{$install_cache_path}.sql" ), true /*add_database*/ ); + + $support_column_statistics = exec( 'mysqldump --help | grep "column-statistics"' ); + $command = '/usr/bin/env mysqldump --no-defaults'; + if ( $support_column_statistics ) { + $command .= ' --skip-column-statistics'; + } + + self::run_sql( $command, array( 'result-file' => "{$install_cache_path}.sql" ), true /*add_database*/ ); } } } From a34b7059b8216b921b1fc3f9a5e32206cb598d4e Mon Sep 17 00:00:00 2001 From: Jack Lowrie Date: Sun, 3 Nov 2019 13:49:44 -0600 Subject: [PATCH 2/7] add travis env to test with mysql8 --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 27b9071cd..d209eba92 100644 --- a/.travis.yml +++ b/.travis.yml @@ -79,3 +79,7 @@ jobs: php: 5.4 dist: precise env: WP_VERSION=5.1 + - stage: test + php: 7.2 + mysql: 8.0 + env: WP_VERSION=latest From 1e1ea8f3f552681133bc0f364b4e12655a0eaa0b Mon Sep 17 00:00:00 2001 From: Jack Lowrie Date: Sun, 3 Nov 2019 14:07:16 -0600 Subject: [PATCH 3/7] Update features/bootstrap/FeatureContext.php Co-Authored-By: Alain Schlesser --- features/bootstrap/FeatureContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php index 47c69f458..cc9ee4901 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -857,7 +857,7 @@ public function install_wp( $subdir = '' ) { mkdir( $install_cache_path ); self::dir_diff_copy( $run_dir, self::$cache_dir, $install_cache_path ); - $support_column_statistics = exec( 'mysqldump --help | grep "column-statistics"' ); + $support_column_statistics = exec( '/usr/bin/env mysqldump --help | grep "column-statistics"' ); $command = '/usr/bin/env mysqldump --no-defaults'; if ( $support_column_statistics ) { $command .= ' --skip-column-statistics'; From 40de3890810968a7c6282dabf4466c71b1cc460a Mon Sep 17 00:00:00 2001 From: Jack Lowrie Date: Sun, 3 Nov 2019 14:09:20 -0600 Subject: [PATCH 4/7] Update .travis.yml this isn't the right way to test a different version of mysql. will create an issue in the framework repo for further investigation --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index d209eba92..27b9071cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -79,7 +79,3 @@ jobs: php: 5.4 dist: precise env: WP_VERSION=5.1 - - stage: test - php: 7.2 - mysql: 8.0 - env: WP_VERSION=latest From 19c7f0a453c4ee3aa1392951c0165446369d6752 Mon Sep 17 00:00:00 2001 From: Jack Lowrie Date: Sun, 3 Nov 2019 14:30:19 -0600 Subject: [PATCH 5/7] Update features/bootstrap/FeatureContext.php Co-Authored-By: Alain Schlesser --- features/bootstrap/FeatureContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php index cc9ee4901..38b2d1f73 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -858,7 +858,7 @@ public function install_wp( $subdir = '' ) { self::dir_diff_copy( $run_dir, self::$cache_dir, $install_cache_path ); $support_column_statistics = exec( '/usr/bin/env mysqldump --help | grep "column-statistics"' ); - $command = '/usr/bin/env mysqldump --no-defaults'; + $command = 'mysqldump --no-defaults'; if ( $support_column_statistics ) { $command .= ' --skip-column-statistics'; } From 798fe50a14db8ef99577f3ef4fb2867e90b0ebfd Mon Sep 17 00:00:00 2001 From: Jack Lowrie Date: Sun, 3 Nov 2019 14:33:05 -0600 Subject: [PATCH 6/7] Update features/bootstrap/FeatureContext.php Co-Authored-By: Alain Schlesser --- features/bootstrap/FeatureContext.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php index 38b2d1f73..c86e0d964 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -857,7 +857,8 @@ public function install_wp( $subdir = '' ) { mkdir( $install_cache_path ); self::dir_diff_copy( $run_dir, self::$cache_dir, $install_cache_path ); - $support_column_statistics = exec( '/usr/bin/env mysqldump --help | grep "column-statistics"' ); + $mysqldump_binary = Utils\force_env_on_nix_systems( 'mysqldump' ); + $support_column_statistics = exec( "{$mysqldump_binary} --help | grep 'column-statistics'" ); $command = 'mysqldump --no-defaults'; if ( $support_column_statistics ) { $command .= ' --skip-column-statistics'; From f577cfee497cf2ee21c3821518cef43e53555ad7 Mon Sep 17 00:00:00 2001 From: Jack Lowrie Date: Sun, 3 Nov 2019 14:39:15 -0600 Subject: [PATCH 7/7] phpcs --- features/bootstrap/FeatureContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php index c86e0d964..ba2311c17 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -857,7 +857,7 @@ public function install_wp( $subdir = '' ) { mkdir( $install_cache_path ); self::dir_diff_copy( $run_dir, self::$cache_dir, $install_cache_path ); - $mysqldump_binary = Utils\force_env_on_nix_systems( 'mysqldump' ); + $mysqldump_binary = Utils\force_env_on_nix_systems( 'mysqldump' ); $support_column_statistics = exec( "{$mysqldump_binary} --help | grep 'column-statistics'" ); $command = 'mysqldump --no-defaults'; if ( $support_column_statistics ) {