Bug #79623 | [python 3, utf8] fetch_row() always returns 'bytes' instead 'str' for strings | ||
---|---|---|---|
Submitted: | 14 Dec 2015 1:15 | Modified: | 6 May 2022 21:29 |
Reporter: | Mykola Ulianytskyi | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / Python | Severity: | S3 (Non-critical) |
Version: | 2.1.3 | OS: | CentOS (7.1) |
Assigned to: | CPU Architecture: | Any |
[14 Dec 2015 1:15]
Mykola Ulianytskyi
[15 Dec 2015 6:57]
Chiranjeevi Battula
Hello Mykola Ulianytskyi, Thank you for the bug report. Verified this behavior on MySQL Connector/Python 2.1.3. Thanks, Chiranjeevi.
[15 Dec 2015 6:58]
Chiranjeevi Battula
Output: (b'chiran',) (b'reddy',) (b'chiranreddy',) (b'reddychiran',) (b'reddychiran',) (b'xd0xbfxd1x80xd0xb8xd0xb2xd0xb5xd1x82',) (b'xxx',) (b'yyy',) (b'zzz',)
[17 Dec 2015 5:38]
Mykola Ulianytskyi
fetch_fields() also returns 'bytes': cnx.query('SELECT name FROM _test') print(cnx.fetch_fields()) [(b'def', b'test', b'_test', b'_test', b'name', b'name', 33, 0, 253, 128, 0)] -- With best regards, Mykola
[5 May 2022 11:05]
Nuno Mariz
Posted by developer: This issue is not reproducible in the latests releases of Connector/Python. Thank you for the bug report.
[6 May 2022 21:29]
Philip Olson
This bug report was seemingly lost but was fixed at some point; we're sorry for the delay in status. Setting it to closed, thank you for the report!
[6 May 2022 21:37]
Philip Olson
Update: it appears this was fixed in C/Python 8.0.12 when the C and Python implementations were evaluated for differences; and then fixed via worklog #11951. This bug number was added to that release note, thanks again!