Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Decode string for *TEXT columns #12

Merged
merged 2 commits into from
Apr 20, 2012
Merged

Conversation

hongqn
Copy link
Contributor

@hongqn hongqn commented Feb 29, 2012

MySQL uses BLOB type code family to represent both *BLOB and *TEXT column types. In original code, they are both treated as binary BLOBs, hence ignore the charset and return python strings. This pull request use the field flags to find out the real type, and decode to unicode if it is a TEXT column.

@jskorpan
Copy link

Interesting,
I'll look into this shortly

Thanks for your effort!

//JT

Den 29 februari 2012 06:55 skrev Qiangning Hong <
reply@reply.github.com

:

MySQL uses BLOB type code family to represent both *BLOB and *TEXT column
types. In original code, they are both treated as binary BLOBs, hence
ignore the charset and return python strings. This pull request use the
field flags to find out the real type, and decode to unicode if it is a
TEXT column.

You can merge this Pull Request by running:

git pull https://github.com/hongqn/ultramysql feature/flags

Or you can view, comment on it, or merge it online at:

#12

-- Commit Summary --

  • treat BLOB as TEXT if BINARY flag is not set
  • add test case

-- File Changes --

M python/umysql.c (7)
M tests/tests.py (32)

-- Patch Links --

https://github.com/esnme/ultramysql/pull/12.patch
https://github.com/esnme/ultramysql/pull/12.diff


Reply to this email directly or view it on GitHub:
#12

Jonas Trnstrm
Product Manager
e-mail: jonas.tarnstrom@esn.me
skype: full name "Jonas Trnstrm"
phone: +46 (0)734 231 552

ESN Social Software AB
www.esn.me

jskorpan pushed a commit that referenced this pull request Apr 20, 2012
Decode string for *TEXT columns
@jskorpan jskorpan merged commit ce3a47a into esnme:master Apr 20, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants