Split out options. Also added some debug logging.
Removed debug lines. Also removed very odd problematic line. Shouldnt need to exist.
Merge pull request #6711 from robertkeizer/mysql_returner_fix

Mysql returner fix