[MXS-953] Charset error when server configued in utf8mb4 Created: 2016-10-20 Updated: 2016-12-14 Resolved: 2016-10-20 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Core |
| Affects Version/s: | None |
| Fix Version/s: | 2.0.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Diego Dupin | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Maxscale actually send latin1 charset to client. test case :
Using java connector (MySQL or MariaDB) will throw an exception using maxscale : "java.sql.SQLDataException: Incorrect string value: '\xF0\x9F\x8C\x9F' for column 'field1' at row 1 Issue Description :Server has to know the charset client is using : So in Initial Handshake Packet server will indicate his default Client will then send the encoding it use in Hanshake response packet C/J will send utf8 (33) or utf8mb4(the value send by server) according to what server send initially. That will cause problems afterwhile, because server check that data are correct according to client charset. when client send a 4 byte utf8 character, server will throw an exception : " Incorrect string value". |
| Comments |
| Comment by markus makela [ 2016-10-20 ] |
|
Fixed in commit f1acc1f4512f67943b1ccdd7284dd5fc64fdc76d by reading the server charset at startup when service permissions are done. |
| Comment by markus makela [ 2016-10-20 ] |
|
|