This patch fixes a reference leak and improves the error handling in the converter mapping code. Rather accidentially it also drops the cleanup: label and the gotos ;)
https://sourceforge.net/p/mysql-python/patches/79/
Raise IntegrityError for a couple types of relatively new errors.
(Bug 1327679)
Add BIT column support. (Bug 1468725)
Return BINARY columns as normal strings, not arrays. (Bug 1495765)
Add support for a new VARCHAR type; behaves like other CHAR types.
Defer issuing warnings when using SSCursors. (Bug 1495782)
Do not try to encode query strings unless they are unicode instances.
(Bug 1521274)
Fix problem with callproc() when it is used before execute() (which is
legal). (Bug 1541124)
Fix formatting of datetime.timedelta values. (Bug 1527801)
Fix connect_timeout documentation bug. (Bug 1523883)
MySQL-5.0).
Mapped some new error codes to DataError, which has always existed,
but never had anything mapped to it.
Cleaned set_character_set() a bit.
Added new connection option sql_mode and correspond set_sql_mode()
method.
* _mysql.c: raise ProgrammingError for certain methods if they
are used on Result object created with conn.use_result(),
since they don't make sense.
* setup.py: Reimplement quote stripping around directory names.
This seems to be a bug in older versions of mysql_config
* cursors.py: If a unicode query string is passed, encode it in
the connection's character set.
and it seems to cause problems on some platforms or versions of MySQL
(most likely 3.23's mysql_config)
* removed use of weak references; I don't think they were needed any more,
and they caused problems in some of the threaded tests.
* applied patch #1188359: If converters are passed in, use a copy().
* Version 1.2.1c2.
* Reworked Unicode support; please test
* Make Binary() create an array('c')
* Clean up Cursors a bit.
* Add a TimeDelta factory function, even though not in the API spec.