Fix generated SQL for current MySQL versions.