[CONPY-69] Error inserting utf8 character using Connection pool Created: 2020-06-01 Updated: 2020-06-02 Resolved: 2020-06-02 |
|
| Status: | Closed |
| Project: | MariaDB Connector/Python |
| Component/s: | Performance |
| Affects Version/s: | 0.9.59 |
| Fix Version/s: | 1.0.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Sheldon | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Connector, utf8 | ||
| Environment: |
Raspberry pi 4B, Python 3.7.3 |
||
| Description |
|
I'm trying to insert Chinese characters into my database. The same SQL statement works perfectly when I'm using an individual connection to execute it. However, a different behavior was observed when I'm using a connection from connection pool. When I'm using connection pool, all Chinese characters in the SQL statement will be converted to ASCII, for example, "7.26å„„" will be stored in the database, where the number part was correct. Also, if the database name is in Chinese, "Runtime error Failed to create exception" will happen if my SQL statement was trying to use that database.
|
| Comments |
| Comment by Georg Richter [ 2020-06-01 ] |
|
I'm not sure if my latest commit fixed all the issues - the problem not only for pooled connections but also for "normal" connection was that we send the character set not before authentication phase. Would it be possible for you to download/clone from gitub and build it on your raspberry for checking if the fix solves your problems (and to give some feedback) ? |
| Comment by Sheldon [ 2020-06-02 ] |
|
The latest version in GitHub has solved the issue. |