My hosting provider reboots their mysql database every
hour, causing my persistent mysqldb apps to crash with
"mysql server has gone away".
This patch exposes the MYSQL_OPT_RECONNECT flag in the
connect() method. You can now send a keyword argument
of "reconnect=1" to cause the mysql API to attempt to
reconnect if the connection is lost.