Opened 8 years ago
Closed 8 years ago
#7117 closed defect (bug) (fixed)
CREATE TABLE not setting table collation
Reported by: | DJPaul | Owned by: | DJPaul |
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | good-first-bug |
Cc: |
Description
When creating a table, we use bp_core_set_charset()
to set the charset. This function dates back to 1.5, despite its PHPDoc which says 1.1 or something. We do not set the collation, resulting that being set to whatever the default for the version of MySQL is, resulting in mismatches on new installs against the collation that WordPress uses.
Reported on https://buddypress.org/support/topic/db-collation-utf8mb4_general_ci/
In the years since BP 1.5, WordPress 3.5 added a convenience function wpdb->get_charset_collate()
which does both charset and collation. We should switch out our bp_core_set_charset()
function with calls to get_charset_collate
, and soft-deprecate it.
In 10902: