Mysql improvement fixes part2