Skip to content

Conversation

@jacklowrie
Copy link
Contributor

This pull request ensures that column-statistics is not used if supported by the user's version of mysql. If column-statistics are supported by the user's version of mysql supports column-statistics, the --skip-column-statistics tag is added to the mysqldump command.

This is related to #4, wp-cli/db-command#103, and wp-cli/db-command#105

@jacklowrie jacklowrie requested a review from a team as a code owner November 3, 2019 19:35
@jacklowrie jacklowrie mentioned this pull request Nov 3, 2019
@schlessera schlessera added bug Something isn't working scope:testing labels Nov 3, 2019
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"' );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should stick to one way to locating the mysqldump binary only:

Suggested change
$support_column_statistics = exec( 'mysqldump --help | grep "column-statistics"' );
$support_column_statistics = exec( '/usr/bin/env mysqldump --help | grep "column-statistics"' );

jacklowrie and others added 2 commits November 3, 2019 14:07
Co-Authored-By: Alain Schlesser <alain.schlesser@gmail.com>
this isn't the right way to test a different version of mysql. will create an issue in the framework repo for further investigation
jacklowrie and others added 2 commits November 3, 2019 14:30
Co-Authored-By: Alain Schlesser <alain.schlesser@gmail.com>
Co-Authored-By: Alain Schlesser <alain.schlesser@gmail.com>
@schlessera schlessera added this to the 2.1.5 milestone Nov 3, 2019
@schlessera schlessera merged commit 593ec79 into wp-cli:master Nov 3, 2019
@schlessera
Copy link
Member

Thanks for the PR, @jacklowrie !

schlessera added a commit that referenced this pull request Jan 5, 2022
Fix MySQL8 column-statistics compatibility issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working scope:testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants