[Python-modules-team] Bug#474580: python-mysqldb: Missing support for TEXT data type
chrislb at gmx.de
Sun Apr 6 16:23:43 UTC 2008
MySQLdb seems to miss support for MySQL's data type TEXT. This crops up when
handling Unicode encoded strings.
TEXT seems to be similar to a BLOB though having textual features on sorting
and knows about encoding. 
The current behaviour towards TEXT data is to return it unencoded though
others seem to cover conversion (Unicode).
When option use_unicode is set to true MySQLdb will convert the following
for types according to the encoding: 
The field type definition  lacks an explicit definition of the TEXT type
and thus I assume further down in the implementation the case of TEXT
elements is not covered.
As I understand from the MySQL documentation  a BLOB shouldn't be
converted using some encoding though TEXT should be.
I couldn't find a place where the library asks about the actual data type
comming from MySQL but adding a new field type and adding it to the
conversion method doesn't do the trick. I guess this has to be fixed
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.22 (PREEMPT)
Locale: LANG=de_DE at euro, LC_CTYPE=zh_CN.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages python-mysqldb depends on:
ii libc6 2.7-10 GNU C Library: Shared libraries
ii libmysqlclient15off 5.0.51a-3 MySQL database client library
ii python 2.4.4-6 An interactive high-level object-o
ii python-support 0.7.7 automated rebuilding support for P
python-mysqldb recommends no packages.
-- no debconf information
More information about the Python-modules-team