Bug 117948 - After upgrading to MySQL 5, dev-db/mysql-python returns the wrong types for DECIMAL fields
Bug#: 117948 Product:  Gentoo Linux Version: 2005.1 Platform: All
OS/Version: Other Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: python@gentoo.org Reported By: lee.packham@prizefight.co.uk
Component: Ebuilds
URL: 
Summary: After upgrading to MySQL 5, dev-db/mysql-python returns the wrong types for DECIMAL fields
Keywords:  
Status Whiteboard: 
Opened: 2006-01-05 14:54 0000
Description:   Opened: 2006-01-05 14:54 0000
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 From Lee Packham 2006-01-05 14:55:11 0000 -------
Created an attachment (id=76278) [details]
Overlay ebuild (for portage overlay) that fixes the problem

------- Comment #2 From Jakub Moc (RETIRED) 2006-01-05 15:06:10 0000 -------
Please, attach a plaintext patch. Thanks.

------- Comment #3 From Lee Packham 2006-01-05 15:36:15 0000 -------
Created an attachment (id=76285) [details]
Patch for MySQLdb 1.2.0 to work with MySQL 5

------- Comment #4 From Alastair Tse (RETIRED) 2006-02-06 14:07:01 0000 -------
thanks for the patch. added to mysql-python-1.2.0-r1.