diff --git a/features/db-query.feature b/features/db-query.feature index 5831a536..76ac806c 100644 --- a/features/db-query.feature +++ b/features/db-query.feature @@ -84,31 +84,4 @@ Feature: Query the database with WordPress' MySQL config When I try `wp db query --no-defaults --debug` Then STDERR should match #Debug \(db\): Running shell command: /usr/bin/env (mysql|mariadb) --no-defaults --no-auto-rehash# - Scenario: SQL modes do not include any of the modes incompatible with WordPress - Given a WP install - When I try `wp db query 'SELECT @@SESSION.sql_mode;' --debug` - Then STDOUT should not contain: - """ - NO_ZERO_DATE - """ - And STDOUT should not contain: - """ - ONLY_FULL_GROUP_BY - """ - And STDOUT should not contain: - """ - STRICT_TRANS_TABLES - """ - And STDOUT should not contain: - """ - STRICT_ALL_TABLES - """ - And STDOUT should not contain: - """ - TRADITIONAL - """ - And STDOUT should not contain: - """ - ANSI - """ diff --git a/src/DB_Command.php b/src/DB_Command.php index 7409935c..6f1d1762 100644 --- a/src/DB_Command.php +++ b/src/DB_Command.php @@ -533,11 +533,6 @@ public function query( $args, $assoc_args ) { $assoc_args['execute'] = $args[0]; } - if ( isset( $assoc_args['execute'] ) ) { - // Ensure that the SQL mode is compatible with WPDB. - $assoc_args['execute'] = $this->get_sql_mode_query( $assoc_args ) . $assoc_args['execute']; - } - $is_row_modifying_query = isset( $assoc_args['execute'] ) && preg_match( '/\b(UPDATE|DELETE|INSERT|REPLACE|LOAD DATA)\b/i', $assoc_args['execute'] ); if ( $is_row_modifying_query ) {