Search code examples
mysqlmediawikicolumn-types

Storing string in binary format in MySQL


Why page title are stored in binary format instead of char format in MediaWiki? http://www.mediawiki.org/wiki/Manual:Page_table#page_title

SELECT page_id, BINARY CONVERT(page_title USING utf8) as page_title ...

Is there any advantage or general benefit?


Solution

  • Because MySQL's utf8 collation doesn't support characters outside of Basic Multilingual Plane and utf8mb4 which does was added only recently, in MySQL 5.5.3. And in MySQL's implementation "doesn't support" means "mangled text".