Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 8 years ago

#7117 closed defect (bug) (fixed)

CREATE TABLE not setting table collation

Reported by: djpaul's profile DJPaul Owned by: djpaul's profile 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.

Change History (3)

#1 @DJPaul
8 years ago

  • Component changed from API to Core

#2 @DJPaul
8 years ago

  • Milestone changed from Future Release to 2.7
  • Owner set to DJPaul
  • Status changed from new to assigned

#3 @djpaul
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 10902:

Explicitly set database collation type when installing BuddyPress.

Fixes #7117, props kitsunesolar

Note: See TracTickets for help on using tickets.