Include errno in "error totally whack" exception
MySQL database connector for Python programming
Brought to you by:
adustman
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)".
Patch to modify "error totally whack" error message to include error number received from mysql_errno()