Possible fixes for some recently reported MySQL issues
Merge branch 'master' into db-fixes
Merge branch 'master' into db-fixes
Merge branch 'master' into db-fixes
Remove (now purposeless) interlock
Merge pull request #772 from TehGimp/db-fixes

DB fixes