Here's a repaired metadata.db, just replace your metadata.db with it
For your future reference, you can do the repair yourself with the command
Code:
calibre-debug --reinitialize-db metadata.db
The repair process caused the comment metadata from about 10 books to be discarded, but everything else should be as before.