Bug #83516 | Result of JSON_TYPE is bytearray instead of str | ||
---|---|---|---|
Submitted: | 25 Oct 2016 9:21 | Modified: | 9 Mar 2018 22:36 |
Reporter: | Daniël van Eeden (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / Python | Severity: | S3 (Non-critical) |
Version: | 2.1.4 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | json |
[25 Oct 2016 9:21]
Daniël van Eeden
[25 Oct 2016 11:03]
Chiranjeevi Battula
Hello Daniël, Thank you for the bug report and test case. Verified this behavior on MySQL Connector/Python 2.1.4. Thanks, Chiranjeevi.
[25 Oct 2016 11:04]
Chiranjeevi Battula
output: Driver: mysql.connector 2.1.4 MySQL version: 5.7.16-log VALUE: {"foo": "bar"}, TYPE: <class 'str'> VALUE: bytearray(b'OBJECT'), TYPE: <class 'bytearray'> VALUE: foo, TYPE: <class 'str'> >>>
[9 Mar 2018 22:36]
Philip Olson
Posted by developer: Fixed as of the upcoming MySQL Connector/Python 8.0.11 release, and here's the changelog entry: The result from JSON_TYPE() was returned as a bytearray instead of a string. The returned value is now a string decoded using the current character set, or as a bytearray if this conversion fails. Thank you for the bug report.
[2 May 2018 22:09]
Philip Olson
Posted by developer: This fix in 8.0.11 was backported to the upcoming MySQL Connector/Python 2.1.8 release.