Bug #74255 MySQLServer object creates connections with \"use_unicode=False\"
Submitted: 7 Oct 2014 17:05 Modified: 16 Oct 2014 23:48
Reporter: Alfranio Tavares Correia Junior Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Fabric Severity:S3 (Non-critical)
Version:1.5.1 OS:Any
Assigned to: CPU Architecture:Any

[7 Oct 2014 17:05] Alfranio Tavares Correia Junior
Description:
MySQLServer object creates connections with "use_unicode=False" and as
a consequence some statements return fields in bytearray format. The
code though is expecting strings or unicode fields and the unexpected
field data types might cause problems to several modules such as
replication and high availability.

This happens because the routine that converts MySQL data types to
python data types has the following code:

    if isinstance(value, (bytes, bytearray)) and self.use_unicode:
        return value.decode(self.charset)

How to repeat:
Check the code.

Suggested fix:
Make the MySQLServer object use unicode.
[16 Oct 2014 23:48] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Utilities 1.5.3 release, and here's the changelog entry:

The MySQLServer object created connections with "use_unicode=False", and
as a consequence some statements returned fields in the bytearray format,
as opposed to the expected strings or unicode fields. This unexpected
field data type would sometimes cause problems with several modules, such
as replication and high availability.

Thank you for the bug report.