Mastacheata (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))):
The 65.535 is a bit strange, because that's exactly the largest unsigned 16 bit integer number (2^16 - 1), but I can't see where 16 bit integers would be used in SAM.
Delphi definitely uses 32bit integers and MySQL is set up to use signed 32 bit integers for all ID columns (which is strange, because there's no need for ID numbers to get negative, but shouldn't have any reasonable effect on the ID counter as you can still store 2.147.483.647 (2^(32-1) - 1) tracks before it flips over or stops working.
So yeah, this is most likely an index problem and can be repaired using the common database repair steps in the forum post linked by DJ Cassio.
Thank you, I had the same problem with the corrupted database but I didn't know the reason, your answer helped me in the right direction to solve the issue I had.