Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 117948 - After upgrading to MySQL 5, dev-db/mysql-python returns the wrong types for DECIMAL fields
Summary: After upgrading to MySQL 5, dev-db/mysql-python returns the wrong types for D...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-05 14:54 UTC by Lee Packham
Modified: 2006-02-06 14:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Overlay ebuild (for portage overlay) that fixes the problem (mysql-python-1.2.0-r1.tar.gz,1.26 KB, application/gzip)
2006-01-05 14:55 UTC, Lee Packham
Details
Patch for MySQLdb 1.2.0 to work with MySQL 5 (mysql5types.patch,1021 bytes, patch)
2006-01-05 15:36 UTC, Lee Packham
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lee Packham 2006-01-05 14:54:42 UTC
MySQLdb doesn't recognise the new DECIMAL field type correctly and returns strings to Python when doing things like SUM().

This has the effect of code that doesn't cast the output from a cursor and then uses the output to compare will throw an exception.

Fixed ebuild (tar.gz'd for people to use in overlays) will be attached.
Comment 1 Lee Packham 2006-01-05 14:55:11 UTC
Created attachment 76278 [details]
Overlay ebuild (for portage overlay) that fixes the problem
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-01-05 15:06:10 UTC
Please, attach a plaintext patch. Thanks.
Comment 3 Lee Packham 2006-01-05 15:36:15 UTC
Created attachment 76285 [details, diff]
Patch for MySQLdb 1.2.0 to work with MySQL 5
Comment 4 Alastair Tse (RETIRED) gentoo-dev 2006-02-06 14:07:01 UTC
thanks for the patch. added to mysql-python-1.2.0-r1.