[wp-trac] [WordPress Trac] #12302: add_metadata() Fails to Store Serialized Values as BINARY

WordPress Trac noreply at wordpress.org
Mon Jan 13 16:48:28 UTC 2014


#12302: add_metadata() Fails to Store Serialized Values as BINARY
-------------------------------+-----------------------------
 Reporter:  miqrogroove        |       Owner:  ryan
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Future Release
Component:  Database           |     Version:  3.0
 Severity:  normal             |  Resolution:
 Keywords:  needs-patch close  |
-------------------------------+-----------------------------
Changes (by bpetty):

 * keywords:  needs-patch => needs-patch close
 * priority:  high => normal
 * version:   => 3.0
 * severity:  critical => normal


Comment:

 As the MySQL connection and encoding is defined through the global
 `DB_COLLATE` and `DB_CHARSET` definitions on installation, and I don't
 believe there's ever going to be the possibility that metadata values will
 ever be re-encoded to a new binary-safe encoding on upgrade, I just don't
 think this will ever be supported.

 If you absolutely need to store non-UTF8 encoded strings or binary data,
 the best option I can think of is to do so in a custom table with your
 explicit schema, or somewhere other than in the DB. Otherwise it should be
 expected that your strings are encoded with whatever `DB_CHARSET` was in
 use on installation.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/12302#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list