Django

Code

Changeset 8380

Show
Ignore:
Timestamp:
08/15/08 09:58:59 (4 months ago)
Author:
mtredinnick
Message:

Reverted [8318] and [8329], since the change turned out to have no effect, upon
closer examination of the C-library layer.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/db/backends/mysql/base.py

    r8329 r8380  
    5252    FIELD_TYPE.NEWDECIMAL: util.typecast_decimal, 
    5353}) 
    54 if hasattr(FIELD_TYPE, "VARCHAR"): 
    55     # By default, MySQLdb will return VARCHAR BINARY fields as type str. 
    56     # This is a bad idea, as BINARY doesn't indicate that it's arbitrary 
    57     # binary data, but that collation uses the binary representation. 
    58     # Replacing the list makes it return unicode. MySQLdb later adds 
    59     # another list entry for non-binary fields. 
    60     # 
    61     # MySQLdb 1.2.1p2 doesn't have the VARCHAR attribute, but it also returns 
    62     # unicode for VARCHAR BINARY columns automatically, so we don't need it 
    63     # there. 
    64     django_conversions[FIELD_TYPE.VARCHAR] = [(FLAG.BINARY, 
    65             lambda s: s.decode('utf-8'))] 
    6654 
    6755# This should match the numerical portion of the version numbers (we can treat