Fix MySQL internal exception.