fixed a strange bug when use mysql.