You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f876a81
Browse filesBrowse the repository at this point in the historyBrowse files
Resolve the wpdb charset and collation without a connection
With DB_CHARSET 'utf8' and an empty DB_COLLATE, $wpdb->collate stayed
empty, because the charset was only initialized before connecting, when
wpdb::determine_charset() doesn't resolve it. Tables created with
get_charset_collate() then got the MySQL 8-only utf8mb4_0900_ai_ci
collation, which fails to import into MariaDB.
SQLite stores all text as UTF-8 and the emulated connection always uses
utf8mb4, so the charset and collation don't depend on the connection.
Resolve them to utf8mb4 with utf8mb4_unicode_520_ci (or a configured
UTF-8 collation) in init_charset(). This also applies while the driver
connects, when it may reconstruct WordPress tables with wp_get_db_schema().
The DB_COLLATE tests run in separate processes. In CI, load the native
parser extension from an INI file, so that these processes load it too,
and avoid a PHP 8.5 deprecation in the native parser check that fails them.
Reported in Automattic/studio#4737
0 commit comments