[CONJ-589] Unexpected behaviors for utf8mb4 in MariaDbClob. Created: 2018-03-16 Updated: 2019-02-08 Resolved: 2018-12-20 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | None |
| Fix Version/s: | 1.8.0, 2.4.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jicheol Ryu | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
In the MariaDbClob.getSubString use java.lang.String.substring but MariaDbClob.length uses codePointCount. It means String will be truncated unexpectedly in next code if String contains 4 byte UTF-8. because Java uses 2 chars for 4 byte unicode. clob.getSubString(1L, (int)clob.length()); It makes issue with mybatis ClobTypeHandler. |