Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#67 Include errno in "error totally whack" exception

MySQLdb
open
Andy Dustman
MySQLdb (53)
5
2012-09-19
2010-10-13
Andy Grove
No

When using MySQLDB with the dbShards MySQL Driver (which is a binary compatible replacement for the regular libmysqlclient that provides database sharding capabilities to existing Python/Django apps), MySQLDB throws an "error totally whack" error message when mysql_errno() returns a dbShards error code which are always > 2999. This makes it hard to debug issues easily.

The attached patch simply throws a slightly more meaningful exception such as "error totally whack (mysql_errno returned 9101)".

Discussion