fix "unsafe checking" in mysql module