Bug #58244 Connector/Net doesn't support utf8mb4
Submitted: 17 Nov 2010 2:41 Modified: 18 Nov 2010 15:29
Reporter: Sho Ijiri Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:6.3.5 / trunk OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[17 Nov 2010 2:41] Sho Ijiri
Description:
Connector/Net doesn't have support to access utf8mb4 tables/columns.
When I try to access utf8mb4 tables/columns, it throws KeyNotFoundException because there is no entry for utf8mb4 in charset map.

How to repeat:
1. Install mysql 5.5.3+ and Connector/Net 6.3.5
2. Create table with utf8mb4 charset.
3. Connect to the mysql server with conenction string includes "charset=utf8mb4" option.
4. It throws KeyNotFoundException 

Suggested fix:
Add following code to LoadCharsetMap() in CharSetMap.cs 

mapping.Add("utf8mb4", new CharacterSet("utf-8", 4));
[17 Nov 2010 20:57] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/124195

846 Reggie Burnett	2010-11-17
      - adding mapping for UTF8MB4 charset introduced with 5.5.3 (bug #58244)
[17 Nov 2010 21:11] Reggie Burnett
Fixed in 6.0.8, 6.1.6, 6.2.5, 6.3.6+
[18 Nov 2010 15:29] Tony Bedford
An entry has been added to the 6.0.8, 6.1.6, 6.2.5, and 6.3.6 changelogs:

MySQL Connector/NET did not support the utf8mb4 character set. When attempting to connect to utf8mb4 tables or columns an exception KeyNotFoundException was generated.