Follow-up to r6506, with an improved patch from the !SnapLogic people.
Also, I've cleaned the `import MySQLdb` a bit. Closes #6821.
Authored by: cboos 2008-02-13
Parent: [r6509]
Child: [r6511]