fix a bug in mysql