pymysql breaks last_executed_query()
|Reported by:||christian.oudard@…||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.5|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
In last_executed_query(), the value returned by cursor._last_executed is unconditionally decoded as utf8. This presumes that it is a byte string with utf8 encoding.
On the MySQLdb driver, this is true, but on pymysql, it returns a unicode string instead. This prevents anyone from running queries containing unicode characters in debug mode while using pymysql.
I can make a patch for this if necessary.
Change History (5)
comment:1 Changed 3 years ago by akaariai
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:4 Changed 18 months ago by CollinAnderson
- Cc cmawebsite@… added