Monday, September 29, 2008

ERROR 1033: Incorrect Information in File

I ran into a problem today I hadn't seen before.

I had a db crash.  (Actually, I crashed it on purpose, but that's another story.)  When it came back up, everything seemed fine until I tried doing "show create table foobar" and got an error, "ERROR 1033: Incorrect information in file db/foobar".

Turned out the "foobar.frm" file was completely empty --- 0 bytes long.

So the front-end, which is non-transactional, got stopped after opening the file but before writing anything into it.  All our tables are stored in innodb, which is transational, but that doesn't save you from having the front-end leaving half-done junk around after a crash.

The solution?  I just deleted the bogus "foobar.frm" file.