Fix bug in mysql tables.