Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 154308 Details for
Bug 239381
uncorrect handling of encoded strings in cursors.py
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch from http://sourceforge.net/tracker/index.php?func=detail&aid=1521274&group_id=22307&atid=374932
mysqldb_unicode.patch (text/plain), 1.55 KB, created by
ryo fujita
on 2007-05-08 00:42:51 UTC
(
hide
)
Description:
patch from http://sourceforge.net/tracker/index.php?func=detail&aid=1521274&group_id=22307&atid=374932
Filename:
MIME Type:
Creator:
ryo fujita
Created:
2007-05-08 00:42:51 UTC
Size:
1.55 KB
patch
obsolete
>Index: MySQLdb/MySQLdb/cursors.py >=================================================================== >--- MySQLdb/MySQLdb/cursors.py (revision 449) >+++ MySQLdb/MySQLdb/cursors.py (working copy) >@@ -138,12 +138,13 @@ > Returns long integer rows affected, if any > > """ >- from types import ListType, TupleType >+ from types import ListType, TupleType, UnicodeType > from sys import exc_info > del self.messages[:] > db = self._get_db() > charset = db.character_set_name() >- query = query.encode(charset) >+ if isinstance(query,UnicodeType): >+ query = query.encode(charset) > if args is not None: > query = query % db.literal(args) > try: >@@ -183,6 +184,7 @@ > execute(). > > """ >+ from types import UnicodeType > del self.messages[:] > db = self._get_db() > if not args: return >@@ -194,7 +196,8 @@ > return r > p = m.start(1) > charset = db.character_set_name() >- query = query.encode(charset) >+ if isinstance(query,UnicodeType): >+ query = query.encode(charset) > qv = query[p:] > qargs = db.literal(args) > try: >@@ -253,7 +256,7 @@ > for index, arg in enumerate(args): > q = "SET @_%s_%d=%s" % (procname, index, > db.literal(arg)) >- if type(q) is UnicodeType: >+ if isinstance(q,UnicodeType): > q = q.encode(charset) > self._query(q) > self.nextset()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 239381
: 154308