Bug #106585 | mysqlx (X DevAPI) does not work properly with Russian characters | ||
---|---|---|---|
Submitted: | 27 Feb 2022 10:04 | Modified: | 15 Nov 2022 23:30 |
Reporter: | Sveta Smirnova (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / Python | Severity: | S2 (Serious) |
Version: | 8.0.27, 8.0.28 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[27 Feb 2022 10:04]
Sveta Smirnova
[27 Feb 2022 10:04]
Sveta Smirnova
MySQL Shell in Python mode works fine: MySQL cookbook Py > \sql select name n1, name from test.russian where name like 'све%' +-------+-------+ | n1 | name | +-------+-------+ | света | света | +-------+-------+ 1 row in set (0.0008 sec)
[27 Feb 2022 10:06]
Sveta Smirnova
For result = session.sql("select name n1, name from test.russian where name like ?").bind('све%').execute() I get no results and general query log contains: 2022-02-27T10:06:35.024225Z 41309 Query /* xplugin authentication */ SELECT /*+ SET_VAR(SQL_MODE = 'TRADITIONAL') */ @@require_secure_transport, `authentication_string`, `plugin`, (`account_locked`='Y') as is_account_locked, (`password_expired`!='N') as `is_password_expired`, @@disconnect_on_expired_password as `disconnect_on_expired_password`, @@offline_mode and (`Super_priv`='N') as `is_offline_mode_and_not_super_user`, `ssl_type`, `ssl_cipher`, `x509_issuer`, `x509_subject` FROM mysql.user WHERE 'sveta' = `user` AND '%' = `host` 2022-02-27T10:06:35.025615Z 41309 Query select name n1, name from test.russian where name like 'св'
[28 Feb 2022 9:21]
MySQL Verification Team
Hello Sveta, Thank you for the report and feedback. Verified as described with C/Python 8.0.28(VS 2019, Python 3.10) on Wind10. Sincerely, Umesh
[15 Nov 2022 23:30]
Philip Olson
Posted by developer: Fixed as of the upcoming MySQL Connector/Python 8.0.32 release, and here's the proposed changelog entry from the documentation team: Russian characters were not handled correctly by the c-ext version's X DevAPI driver. String values are now encoded to their byte string representation before being sent to protobuf. Thank you for the bug report.