Bug #85100 | Commits related to "BUG22529828" broke binary data handling for python 2.7 | ||
---|---|---|---|
Submitted: | 21 Feb 2017 11:18 | Modified: | 22 Mar 2017 18:51 |
Reporter: | Marcin Lulek | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / Python | Severity: | S2 (Serious) |
Version: | 2.1.4+ | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[21 Feb 2017 11:18]
Marcin Lulek
[21 Feb 2017 12:29]
Chiranjeevi Battula
Hello Marcin Lulek, Thank you for the bug report and test case. Verified this behavior on MySQL Connector/Python 2.1.4. Thanks, Chiranjeevi.
[21 Feb 2017 12:30]
Chiranjeevi Battula
Traceback (most recent call last): File "D:\Python\85100.py", line 35, in <module> new_row = cursor.execute(add_row_q, {'section': 'foo', 'pickled': pickled}) File "C:\Python27\lib\site-packages\mysql\connector\cursor.py", line 537, in execute stmt, self._process_params_dict(params)) File "C:\Python27\lib\site-packages\mysql\connector\cursor.py", line 112, in _bytestr_format_dict if PY2 else bytestr) File "C:\Python27\lib\site-packages\mysql\connector\cursor.py", line 110, in replace return value.decode("utf-8") if PY2 else value File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 1: invalid start byte
[22 Mar 2017 18:42]
Paul DuBois
Posted by developer: Noted in 2.1.6 changelog. The fix for Bug #22529828 caused Python 2.7 to be unable to insert binary data.
[22 Mar 2017 18:51]
Paul DuBois
Posted by developer: Noted in 2.1.6 changelog. The fix for Bug #22529828 caused Python 2.7 to be unable to insert binary data.