Mysql fix and test