MySQL 5.0.16 Python 2.2:
MySQLdb doesn't know about the NEWDECIMAL type in
MySQL 5.0 and is returning them as strings. To fix
NEWDECIMAL = 246
Also add to this section:
from decimal import Decimal
conversions[FIELD_TYPE.DECIMAL] = Decimal
conversions[FIELD_TYPE.NEWDECIMAL] = Decimal
A lot of things come back as decimal type with MySQL
5.0 precision math. For example doing a sum() on a
column returns a NEWDECIMAL type so this needs to be
added for MySQL 5.0 compatibility.
Thanks for your help,
Log in to post a comment.