So, I was making a new DB to track more expensive items (not Shop items per say, but one where I was going to use the price to represent x1000 NP). I only entered a single item into it, saved it, and left it for later.
Upon trying to open that database, Portal would crash at 'Optimizing indices...' 0%, 1 of 2002 (at 25 per second). There is only 1 item in the database.
If I manually put another item in the data_shopstock and index_shopstock, it would open fine. If I remove the original entry, and leave the one that was manually added, the same error occurs.
Not the kind of error many people would ever come across I'm sure