File: fix_last_executed_query.patch

package info (click to toggle)
mysql-connector-python 1.2.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,716 kB
  • ctags: 5,129
  • sloc: python: 23,339; makefile: 28
file content (14 lines) | stat: -rw-r--r-- 687 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Index: mysql-connector-python/python23/django/base.py
===================================================================
--- mysql-connector-python.orig/python23/django/base.py	2014-08-15 07:47:44.000000000 +1000
+++ mysql-connector-python/python23/django/base.py	2014-09-11 09:00:39.894957233 +1000
@@ -372,7 +372,8 @@
         return 'MATCH ({0}) AGAINST (%s IN BOOLEAN MODE)'.format(field_name)
 
     def last_executed_query(self, cursor, sql, params):
-        return cursor.statement
+        from django.utils.encoding import force_text
+        return force_text(cursor.statement)
 
     def no_limit_value(self):
         # 2**64 - 1, as recommended by the MySQL documentation