Bug #71606 utf8mb4 text gives Error Code: 0 Server sent uknown charsetnr. Please report
Submitted: 6 Feb 2014 11:11 Modified: 22 Jul 2014 15:43
Reporter: Arnaud Adant Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / C++ Severity:S2 (Serious)
Version:6.0.9 OS:Any
Assigned to: CPU Architecture:Any

[6 Feb 2014 11:11] Arnaud Adant
Description:
Selecting a TEXT field contains utf8mb4 gives this error :

select * from t LIMIT 0, 1000	Error Code: 0 Server sent uknown charsetnr. Please report	

How to repeat:
use test;
set names utf8mb4;
drop table if exists t;
create table t(txt text) engine=InnoDB charset=utf8mb4;
insert into t(txt) values(convert(convert(unhex('20089') using utf32) using utf8mb4));
select * from t;

Suggested fix:
Fix WB
[6 Feb 2014 11:23] MySQL Verification Team
Repeatable on MySQL Workbench 6.1.1 CE(Beta)
[6 Feb 2014 11:27] MySQL Verification Team
// MySQL client works okay

mysql> select version();
+---------------------------------------+
| version()                             |
+---------------------------------------+
| 5.6.17-enterprise-commercial-advanced |
+---------------------------------------+
1 row in set (0.00 sec)

mysql> use test;
Database changed
mysql> set names utf8mb4;
Query OK, 0 rows affected (0.00 sec)

mysql> drop table if exists t;
Query OK, 0 rows affected (0.01 sec)

mysql> create table t(txt text) engine=InnoDB charset=utf8mb4;
Query OK, 0 rows affected (0.03 sec)

mysql> insert into t(txt) values(convert(convert(unhex('20089') using utf32) using utf8mb4));
Query OK, 1 row affected (0.00 sec)

mysql> select * from t;
+------+
| txt  |
+------+
| ð      |
+------+
1 row in set (0.00 sec)
[29 May 2014 9:56] Hemant Dangi
Posted by developer:
 
patch for this bug pushed in rev#962 of Connector/C++.
[22 Jul 2014 6:49] Hemant Dangi
Posted by developer:
 
The driver missed definitions of many collations(utf8mb4 in particular)
That could cause exception in resultset's metadata methods isCaseSensitive and getColumnDisplaySize if resultset's charset was one of those missing.
The patch adds missing charsets to the array with charsets info, and fixes some minor errors in it(the array).
[22 Jul 2014 15:43] Paul DuBois
Noted in 1.1.4 changelog.

Definitions for character sets and collations were added (utf8mb4 in
particular).