Description
Bug Report
WordPress Core is incompatible with some SQL modes:
https://github.com/WordPress/wordpress-develop/blob/5.4.0/src/wp-includes/wp-db.php#L559-L572
In order to work with newer versions of MySQL that use one or more of these incompatible modes by default, WordPress Core adapts the MySQL session to filter out the incompatible modes.
This is transparently taken care of WP-CLI for all of the commands that rely on the $wpdb
global object to execute the queries.
However, for the commands that use the mysql
binary directly to execute queries, this is not done yet. This can lead to problems where a query that would work within WordPress would not work with a command like wp db query ...
.
WP-CLI should match what WordPress Core does for the commands that use the mysql
binary directly.
Examples of failures: