Skip to content

Commit bdb1450

Browse files
committed
Update --skip-optimization doc block and verify import query result in Behat test
1 parent 7da3544 commit bdb1450

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

features/db-import.feature

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@ Feature: Import a WordPress database
391391
"""
392392
And the side_effect.sql file should not exist
393393
394+
When I run `wp db query 'SELECT id FROM wp_cli_meta_test;' --skip-column-names`
395+
Then STDOUT should be:
396+
"""
397+
42
398+
"""
399+
394400
@require-mysql-or-mariadb
395401
Scenario: `wp db import` does not execute embedded client meta-commands in dump content
396402
Given a WP install

src/DB_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ private function command_supports_option( $command, $option ) {
926926
* : Extra arguments to pass to mysql. [Refer to mysql binary docs](https://dev.mysql.com/doc/refman/8.0/en/mysql-command-options.html).
927927
*
928928
* [--skip-optimization]
929-
* : When using an SQL file, do not include speed optimization such as disabling auto-commit and key checks.
929+
* : Do not disable unique checks and foreign key checks during import.
930930
*
931931
* [--skip-sql-mode-compat]
932932
* : Do not adapt the session SQL mode for WordPress compatibility. By default, `wp db import` strips the SQL modes that WordPress Core disables (such as `STRICT_TRANS_TABLES` and `NO_ZERO_DATE`) so that dumps containing legacy values like `0000-00-00` import cleanly. Pass this flag to import under the server's own SQL modes instead.

0 commit comments

Comments
 (0)