MySQL error 22 (when using alter table to add an index)
Today, I have spent a couple of hours attempting to do some analysis on a large table. I say attempting, because every time I tried to add an index to the table after importing it, MySQL would crap out, and CHECK TABLE would report "got error: 22 when reading datafile". Really weird stuff! Luckily for me, I managed to track down the cause, so I'm writing it down for the next time I run into this difficult to solve problem.