Fix problem with mysql string length (See #710)